mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-04 12:13:11 +00:00
#354 Add tests for Properties
This commit is contained in:
1 parent
4a49f82f23
commit
77e14f0069
2 files changed
+13
No files matched your search
@@ -11,6 +11,7 @@ public class UserGroup {
|
||||
private static List<User> freeGroup = new ArrayList<>();
|
||||
private static List<User> paidGroup = new ArrayList<>();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user {@link User} to be added to the free group
|
||||
|
||||
+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