From f50612c269bd81a78f1b215357075f14f77a5970 Mon Sep 17 00:00:00 2001 From: John Yani Date: Thu, 25 Oct 2012 12:52:08 +0300 Subject: Update README.markdown Simplify --- README.markdown | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.markdown b/README.markdown index 18c69e7..0aecbf5 100644 --- a/README.markdown +++ b/README.markdown @@ -28,19 +28,15 @@ public class JCommanderTest { and how you use it: ```java -CommanderTest jct = new JCommanderTest(); +JCommanderTest jct = new JCommanderTest(); String[] argv = { "-log", "2", "-groups", "unit1,unit2,unit3", - "-debug", "-Doption=value", "a", "b", "c" }; + "-debug", "-Doption=value", "a", "b", "c" }; new JCommander(jct, argv); Assert.assertEquals(2, jct.verbose.intValue()); Assert.assertEquals("unit1,unit2,unit3", jct.groups); Assert.assertEquals(true, jct.debug); - -Map params = new HashMap(); -params.put("option", "value"); -Assert.assertEquals(params, jct.params); - +Assert.assertEquals("value", jct.dynamicParams.get("option")); Assert.assertEquals(Arrays.asList("a", "b", "c"), jct.parameters); ``` -- cgit v1.2.3