mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 00:59:02 +00:00
#354 Add tests for Properties
This commit is contained in:
+12
@@ -13,6 +13,18 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class PropertiesFeatureToggleVersionTest {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testNullPropertiesPassed() throws Exception {
|
||||
new PropertiesFeatureToggleVersion(null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testNonBooleanProperty() throws Exception {
|
||||
final Properties properties = new Properties();
|
||||
properties.setProperty("enhancedWelcome","Something");
|
||||
new PropertiesFeatureToggleVersion(properties);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFeatureTurnedOn() throws Exception {
|
||||
final Properties properties = new Properties();
|
||||
|
||||
Reference in New Issue
Block a user