config.removeGlobal(name); } else { config.remove(name);
@Test public void testGlobalOnly() { ConfigDatabase globalOnly = IniFileConfigDatabase.globalOnly(platform); testGlobalOnly(() -> globalOnly.get("section.key")); testGlobalOnly(() -> globalOnly.getAll()); testGlobalOnly(() -> globalOnly.get("section.key", String.class)); testGlobalOnly(() -> globalOnly.getAllSection("section")); testGlobalOnly(() -> globalOnly.getAllSubsections("section.sub")); testGlobalOnly(() -> globalOnly.put("section.key", "val")); testGlobalOnly(() -> globalOnly.remove("section.key")); testGlobalOnly(() -> globalOnly.removeSection("section")); }
config.removeGlobal(name); } else { config.remove(name);
@Test public void testGlobalOnly() { ConfigDatabase globalOnly = IniFileConfigDatabase.globalOnly(platform); testGlobalOnly(() -> globalOnly.get("section.key")); testGlobalOnly(() -> globalOnly.getAll()); testGlobalOnly(() -> globalOnly.get("section.key", String.class)); testGlobalOnly(() -> globalOnly.getAllSection("section")); testGlobalOnly(() -> globalOnly.getAllSubsections("section.sub")); testGlobalOnly(() -> globalOnly.put("section.key", "val")); testGlobalOnly(() -> globalOnly.remove("section.key")); testGlobalOnly(() -> globalOnly.removeSection("section")); }
@Test public void testRemove() { // Test integer and string config.put("section1.int", 1); config.put("section1.subsection.string", "2"); config.put("section1.subsection.subsub.int", 1); config.put("section1.subsection.subsub.string", "4"); config.put("section2.int", 3); assertTrue(config.get("section1.int").isPresent()); config.remove("section1.int"); assertFalse(config.get("section1.int").isPresent()); assertTrue(config.get("section1.subsection.subsub.string").isPresent()); config.remove("section1.subsection.subsub.string"); assertFalse(config.get("section1.subsection.subsub.string").isPresent()); }
@Test public void testRemove() { // Test integer and string config.put("section1.int", 1); config.put("section1.subsection.string", "2"); config.put("section1.subsection.subsub.int", 1); config.put("section1.subsection.subsub.string", "4"); config.put("section2.int", 3); assertTrue(config.get("section1.int").isPresent()); config.remove("section1.int"); assertFalse(config.get("section1.int").isPresent()); assertTrue(config.get("section1.subsection.subsub.string").isPresent()); config.remove("section1.subsection.subsub.string"); assertFalse(config.get("section1.subsection.subsub.string").isPresent()); }
@Test public void testNoCommitterEmail() throws Exception { injector.configDatabase().remove("user.email"); CommitOp commitCommand = geogig.command(CommitOp.class); exception.expect(IllegalStateException.class); commitCommand.setAllowEmpty(true).call(); }
@Test public void testNoCommitterName() throws Exception { injector.configDatabase().remove("user.name"); CommitOp commitCommand = geogig.command(CommitOp.class); exception.expect(IllegalStateException.class); commitCommand.setAllowEmpty(true).call(); }
@Test public void testNoCommitterName() throws Exception { injector.configDatabase().remove("user.name"); CommitOp commitCommand = geogig.command(CommitOp.class); exception.expect(IllegalStateException.class); commitCommand.setAllowEmpty(true).call(); }
@Test public void testNoCommitterEmail() throws Exception { injector.configDatabase().remove("user.email"); CommitOp commitCommand = geogig.command(CommitOp.class); exception.expect(IllegalStateException.class); commitCommand.setAllowEmpty(true).call(); }
testConfig.remove("storage.objects"); testConfig.put("testObj.version", "1.0");
testConfig.remove("storage.objects"); testConfig.put("testObj.version", "1.0");