@Test public void passManyArgs() throws Exception { caller.call("testSlim", "manyArgs", "1", "2.1", "c"); assertEquals(1, testSlim.getIntegerObjectArg().intValue()); assertEquals(2.1, testSlim.getDoubleObjectArg(), .00001); assertEquals('c', testSlim.getCharArg()); }
@Test public void passOneDouble() throws Exception { caller.call("testSlim", "oneDouble", "3.14159"); assertEquals(3.14159, testSlim.getDoubleArg(), .000001); }
@Test public void passOneInt() throws Exception { caller.call("testSlim", "oneInt", "42"); assertEquals(42, testSlim.getIntArg()); }
@Test public void passOneString() throws Exception { caller.call("testSlim", "oneString", "string"); assertEquals("string", testSlim.getStringArg()); }
@Test public void callNiladicFunction() throws Exception { caller.call("testSlim", "nilad"); assertTrue(testSlim.niladWasCalled()); }
@Test public void passOneList() throws Exception { caller.call("testSlim", "oneList", list("one", "two")); assertEquals(list("one", "two"), testSlim.getListArg()); }
@Test public void passOneDate() throws Exception { caller.call("testSlim", "oneDate", "5-May-2009"); assertEquals((Date) new DateConverter().fromString("5-May-2009"), testSlim.getDateArg()); }