Java Code Examples for org.springframework.core.SpringProperties#setProperty()
The following examples show how to use
org.springframework.core.SpringProperties#setProperty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StandardEnvironmentTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void suppressGetenvAccessThroughSpringProperty() { SpringProperties.setProperty("spring.getenv.ignore", "true"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }
Example 2
Source File: StandardEnvironmentTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void suppressGetenvAccessThroughSpringFlag() { SpringProperties.setFlag("spring.getenv.ignore"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }
Example 3
Source File: ContextCacheUtilsTests.java From spring-analysis-note with MIT License | 4 votes |
@Before @After public void clearProperties() { System.clearProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME); SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, null); }
Example 4
Source File: ContextCacheUtilsTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromBogusSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "bogus"); assertDefaultValue(); }
Example 5
Source File: ContextCacheUtilsTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromDecimalSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "3.14"); assertDefaultValue(); }
Example 6
Source File: ContextCacheUtilsTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "99"); assertEquals(99, retrieveMaxCacheSize()); }
Example 7
Source File: StandardEnvironmentTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void suppressGetenvAccessThroughSpringProperty() { SpringProperties.setProperty("spring.getenv.ignore", "true"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }
Example 8
Source File: StandardEnvironmentTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void suppressGetenvAccessThroughSpringFlag() { SpringProperties.setFlag("spring.getenv.ignore"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }
Example 9
Source File: ContextCacheUtilsTests.java From java-technology-stack with MIT License | 4 votes |
@Before @After public void clearProperties() { System.clearProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME); SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, null); }
Example 10
Source File: ContextCacheUtilsTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromBogusSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "bogus"); assertDefaultValue(); }
Example 11
Source File: ContextCacheUtilsTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromDecimalSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "3.14"); assertDefaultValue(); }
Example 12
Source File: ContextCacheUtilsTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void retrieveMaxCacheSizeFromSpringProperty() { SpringProperties.setProperty(MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME, "99"); assertEquals(99, retrieveMaxCacheSize()); }
Example 13
Source File: StandardEnvironmentTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Test public void suppressGetenvAccessThroughSpringProperty() { SpringProperties.setProperty("spring.getenv.ignore", "true"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }
Example 14
Source File: StandardEnvironmentTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Test public void suppressGetenvAccessThroughSpringFlag() { SpringProperties.setFlag("spring.getenv.ignore"); assertTrue(environment.getSystemEnvironment().isEmpty()); SpringProperties.setProperty("spring.getenv.ignore", null); }