Class PropertyConfigSwitcher


  • public class PropertyConfigSwitcher
    extends java.lang.Object
    This class is a helper for temporarily switch property configuration for testing purposes.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyConfigSwitcher​(java.lang.String propertyName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void switchBackToDefault()
      Switches property back to the default.
      void switchToValue​(java.lang.String value)
      Switches property to the given value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertyConfigSwitcher

        public PropertyConfigSwitcher​(java.lang.String propertyName)
    • Method Detail

      • switchToValue

        public void switchToValue​(java.lang.String value)
        Switches property to the given value. Usually usable in the setUp method of the test.
      • switchBackToDefault

        public void switchBackToDefault()
        Switches property back to the default. Usually usable in the tearDown method of the test.