#354 Add tests for Properties

This commit is contained in:
Joseph McCarthy
2016-01-26 23:38:28 +00:00
parent 4a49f82f23
commit 77e14f0069
2 changed files with 13 additions and 0 deletions

View File

@ -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();