@org.junit.Test public void testGetMissingProperty() { FileConfiguration config = new FileConfiguration(); String val = config.getProperty("test.missing.property"); if (val != null) { fail("'test.missing.property' should not be found"); } }
@org.junit.Test public void testGetProperty() { FileConfiguration config = new FileConfiguration(); String val = config.getProperty("test.property"); if (val == null) { fail("'test.property' not found"); } if (val.equals("testvalue") == false) { fail("Unexpected value '" + val + "', expecting 'testvalue'"); } }