SGF-515 - Allow a property to be unset.

This commit is contained in:
John Blum
2016-09-09 13:39:15 -07:00
parent 0ad5769192
commit 2f8c1e994b
2 changed files with 45 additions and 0 deletions

View File

@@ -279,6 +279,16 @@ public class PropertiesBuilderTests {
assertThat(properties.getProperty("two"), is(equalTo("2")));
}
@Test
public void unsetPropertyIsSuccessful() {
Properties properties = PropertiesBuilder.create().unsetProperty("example").build();
assertThat(properties, is(notNullValue(Properties.class)));
assertThat(properties.size(), is(equalTo(1)));
assertThat(properties.containsKey("example"), is(true));
assertThat(properties.getProperty("example"), is(equalTo("")));
}
@Test
public void stringLiteralIsValuable() {
assertThat(PropertiesBuilder.create().isValuable("test"), is(true));