incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1172540 - /sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java
Date Mon, 19 Sep 2011 09:41:19 GMT
Author: fmeschbe
Date: Mon Sep 19 09:41:19 2011
New Revision: 1172540

URL: http://svn.apache.org/viewvc?rev=1172540&view=rev
Log:
SLING-2225 Properly handle setting the sling.control.action property

Modified:
    sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java

Modified: sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java?rev=1172540&r1=1172539&r2=1172540&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java
(original)
+++ sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/MainTest.java
Mon Sep 19 09:41:19 2011
@@ -164,17 +164,38 @@ public class MainTest extends TestCase {
         Map<String, String> props = Main.convertCommandLineArgs(new HashMap<String,
String>() {
             {
                 put("j", "j");
-                put("start", "start");
-                put("stop", "stop");
-                put("status", "status");
             }
         });
         assertNotNull(props);
-        assertEquals(4, props.size());
+        assertEquals(1, props.size());
         assertEquals("j", props.get("j"));
-        assertEquals("start", props.get("start"));
-        assertEquals("stop", props.get("stop"));
-        assertEquals("status", props.get("status"));
+
+        Map<String, String> propsStart = Main.convertCommandLineArgs(new HashMap<String,
String>() {
+            {
+                put("start", "start");
+            }
+        });
+        assertNotNull(propsStart);
+        assertEquals(1, propsStart.size());
+        assertEquals("start", propsStart.get("sling.control.action"));
+
+        Map<String, String> propsStatus = Main.convertCommandLineArgs(new HashMap<String,
String>() {
+            {
+                put("status", "status");
+            }
+        });
+        assertNotNull(propsStatus);
+        assertEquals(1, propsStatus.size());
+        assertEquals("status", propsStatus.get("sling.control.action"));
+
+        Map<String, String> propsStop = Main.convertCommandLineArgs(new HashMap<String,
String>() {
+            {
+                put("stop", "stop");
+            }
+        });
+        assertNotNull(propsStop);
+        assertEquals(1, propsStop.size());
+        assertEquals("stop", propsStop.get("sling.control.action"));
     }
 
     public void test_converCommandLineArgs_l() {



Mime
View raw message