mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
added test case for removeProperty
Former-commit-id: e48ae0be2da9aaab3d51c7b57dcb2919b72fbeb2
This commit is contained in:
@@ -163,4 +163,20 @@ public class SettingsTest {
|
||||
boolean result = Settings.getBoolean(key);
|
||||
Assert.assertEquals(expResult, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of removeProperty method, of class Settings.
|
||||
*/
|
||||
@Test
|
||||
public void testRemoveProperty() {
|
||||
String key = "SomeKey";
|
||||
String value = "value";
|
||||
String dfault = "default";
|
||||
Settings.setString(key, value);
|
||||
String ret = Settings.getString(key);
|
||||
Assert.assertEquals(value, ret);
|
||||
Settings.removeProperty(key);
|
||||
ret = Settings.getString(key, dfault);
|
||||
Assert.assertEquals(dfault, ret);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user