Repository: incubator-tamaya-sandbox Updated Branches: refs/heads/master b813e7b15 -> 03b730bc5
TAMAYA-300 Fixed tests and invalid command output. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/03b730bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/03b730bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/03b730bc Branch: refs/heads/master Commit: 03b730bc5d146a1d012a2f95a54c714ae0410c1e Parents: 8215ad6 Author: Anatole Tresch <anat...@apache.org> Authored: Sun Oct 1 23:04:38 2017 +0200 Committer: Anatole Tresch <anat...@apache.org> Committed: Sun Oct 1 23:05:25 2017 +0200 ---------------------------------------------------------------------- .../org/apache/tamaya/osgi/commands/ConfigCommands.java | 2 +- .../org/apache/tamaya/osgi/commands/ConfigCommandsTest.java | 9 +++++---- .../apache/tamaya/osgi/commands/HistoryCommandsTest.java | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/03b730bc/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/ConfigCommands.java ---------------------------------------------------------------------- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/ConfigCommands.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/ConfigCommands.java index a10b3b8..ece0128 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/ConfigCommands.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/ConfigCommands.java @@ -227,7 +227,7 @@ public final class ConfigCommands { public static String setDefaultEnabled(TamayaConfigPlugin configPlugin, boolean enabled) throws IOException { configPlugin.setTamayaEnabledByDefault(enabled); - return TamayaConfigPlugin.TAMAYA_ENABLED_PROP+"d="+enabled; + return TamayaConfigPlugin.TAMAYA_ENABLED_PROP+"="+enabled; } public static String getDefaultEnabled(TamayaConfigPlugin configPlugin) { http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/03b730bc/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/ConfigCommandsTest.java ---------------------------------------------------------------------- diff --git a/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/ConfigCommandsTest.java b/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/ConfigCommandsTest.java index a3020d7..41a43b7 100644 --- a/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/ConfigCommandsTest.java +++ b/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/ConfigCommandsTest.java @@ -20,6 +20,7 @@ package org.apache.tamaya.osgi.commands; import org.apache.tamaya.osgi.AbstractOSGITest; import org.apache.tamaya.osgi.Policy; +import org.apache.tamaya.osgi.TamayaConfigPlugin; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; @@ -155,11 +156,11 @@ public class ConfigCommandsTest extends AbstractOSGITest{ String result = ConfigCommands.setDefaultEnabled(tamayaConfigPlugin, true); assertNotNull(result); System.out.println(result); - assertTrue(result.contains("tamaya.default-enabled=true")); + assertTrue(result.contains(TamayaConfigPlugin.TAMAYA_ENABLED_PROP+"=true")); assertTrue(tamayaConfigPlugin.isTamayaEnabledByDefault()); result = ConfigCommands.setDefaultEnabled(tamayaConfigPlugin, false); assertNotNull(result); - assertTrue(result.contains("tamaya.default-enabled=false")); + assertTrue(result.contains(TamayaConfigPlugin.TAMAYA_ENABLED_PROP+"=false")); assertFalse(tamayaConfigPlugin.isTamayaEnabledByDefault()); } @@ -180,12 +181,12 @@ public class ConfigCommandsTest extends AbstractOSGITest{ assertNotNull(result); System.out.println(result); assertTrue(result.contains("true")); - assertTrue(result.contains("auto-update")); + assertTrue(result.contains(TamayaConfigPlugin.TAMAYA_AUTO_UPDATE_ENABLED_PROP)); assertTrue(tamayaConfigPlugin.isAutoUpdateEnabled()); result = ConfigCommands.setAutoUpdateEnabled(tamayaConfigPlugin, false); assertNotNull(result); assertTrue(result.contains("false")); - assertTrue(result.contains("auto-update")); + assertTrue(result.contains(TamayaConfigPlugin.TAMAYA_AUTO_UPDATE_ENABLED_PROP)); assertFalse(tamayaConfigPlugin.isAutoUpdateEnabled()); } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/03b730bc/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/HistoryCommandsTest.java ---------------------------------------------------------------------- diff --git a/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/HistoryCommandsTest.java b/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/HistoryCommandsTest.java index b8f63f2..44c61ed 100644 --- a/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/HistoryCommandsTest.java +++ b/osgi/common/src/test/java/org/apache/tamaya/osgi/commands/HistoryCommandsTest.java @@ -74,7 +74,7 @@ public class HistoryCommandsTest { String result = HistoryCommands.getMaxHistorySize(); assertEquals(result, String.valueOf(ConfigHistory.getMaxHistory())); result = HistoryCommands.setMaxHistorySize(111); - assertEquals(result, "tamaya.max-history-size=111"); + assertEquals(result, "tamaya-max-history-size=111"); result = HistoryCommands.getMaxHistorySize(); assertEquals(result, "111"); }