List of usage examples for java.lang System clearProperty
public static String clearProperty(String key)
From source file:se.ivankrizsan.messagecowboy.integrationtest.camel.CamelSuccessfulOneTaskTest.java
/** * Subsequent tests may not want the transport to be set to Camel. *//*from www . j a v a 2 s .co m*/ @AfterClass public static void staticTearDown() { System.clearProperty("messagecowboy.transport"); }
From source file:org.bonitasoft.engine.util.APITypeManagerTest.java
@Before @After/*from w w w . j a v a 2s .c o m*/ public void before() throws Exception { APITypeManager.refresh(); System.clearProperty("bonita.home"); System.clearProperty("org.bonitasoft.engine.api-type"); System.clearProperty("org.bonitasoft.engine.api-type.server.url"); }
From source file:org.carrot2.dcs.DcsAppTest.java
@AfterClass public static void stopDcs() throws Exception { dcs.stop();/*w w w . ja v a 2s .c o m*/ if (appenderProp != null) System.setProperty(RestProcessorServlet.DISABLE_LOGFILE_APPENDER, appenderProp); else System.clearProperty(RestProcessorServlet.DISABLE_LOGFILE_APPENDER); }
From source file:ninja.utils.NinjaPropertiesImplTest.java
@After public void tearDown() { // make sure the external conf property is removed after the test. System.clearProperty(NinjaProperties.NINJA_EXTERNAL_CONF); System.clearProperty(NinjaConstant.MODE_KEY_NAME); }
From source file:org.constretto.spring.factorybean.ConstrettoSingletonFactoryBeanTest.java
@Test(expected = BeanCreationException.class) public void givenNoStageOnStartupAndNoDefaultThenThenThrowBeanCreationException() throws Exception { System.clearProperty(ASSEMBLY_KEY); EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean"); }
From source file:io.crate.protocols.http.CrateHttpsTransportIntegrationTest.java
@AfterClass public static void afterIntegrationTest() { System.clearProperty("javax.net.ssl.trustStore"); System.clearProperty("javax.net.ssl.trustStorePassword"); }
From source file:com.jive.myco.seyren.core.service.checker.GraphiteTargetCheckerTest.java
@After public void after() { System.clearProperty("GRAPHITE_URL"); }
From source file:io.vertx.stack.StackResolutionTest.java
@After public void tearDown() { System.clearProperty("vertx.version"); }
From source file:com.talis.inject.guice.PropertiesConfiguredModuleFactoryTest.java
@Test public void readPropertiesFromFileSpecifiedBySystemProperty() throws Exception { File tmpFile = File.createTempFile("injector-module", ".properties"); tmpFile.deleteOnExit();/*ww w . j a v a2 s. c o m*/ FileUtils.writeStringToFile(tmpFile, String.format("%s=%s", PropertiesConfiguredModuleFactory.MODULE_PROPERTY, TestModuleThree.class.getName())); System.clearProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP); try { System.setProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP, tmpFile.getAbsolutePath()); Module[] modules = new PropertiesConfiguredModuleFactory().getModules(); assertEquals(1, modules.length); assertTrue(TestModuleThree.class.isInstance(modules[0])); } finally { System.clearProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP); } }
From source file:org.cloudfoundry.identity.uaa.BootstrapTests.java
@AfterClass public static void restoreProfiles() { if (activeProfiles != null) { System.setProperty("spring.profiles.active", activeProfiles); } else {/*from w w w .j a v a 2s. c om*/ System.clearProperty("spring.profiles.active"); } }