From: Mike H. <he...@us...> - 2002-12-03 15:13:07
|
Update of /cvsroot/velcro/velcro/testsuite/simpletest/src/java/velcro/testsuite/simpletest/tests In directory sc8-pr-cvs1:/tmp/cvs-serv19146/velcro/testsuite/simpletest/tests Modified Files: Test.java Log Message: Fixed test cases so they actually work. Index: Test.java =================================================================== RCS file: /cvsroot/velcro/velcro/testsuite/simpletest/src/java/velcro/testsuite/simpletest/tests/Test.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Test.java 30 Oct 2002 00:26:50 -0000 1.4 --- Test.java 3 Dec 2002 15:13:05 -0000 1.5 *************** *** 95,106 **** } - public void testBroadcasterAvailable() throws CreateException, NamingException, RemoteException, RemoveException { - MessageBroadcaster broadcaster = createBroadcaster(); - - ActionMessage msg = new ActionMessageBase(); - broadcaster.broadcast(msg); - broadcaster.remove(); - } - public void testCalledEJB1() throws CreateException, NamingException, RemoteException, RemoveException { MessageBroadcaster broadcaster = createBroadcaster(); --- 95,98 ---- *************** *** 108,113 **** ActionMessage msg = new ActionMessageBase(); msg.setType(Constants.TYPE_TEST1); ! broadcaster.broadcast(msg); broadcaster.remove(); assertTrue("Failed to set data field " + Constants.DATA_ITEM1, msg.getData().containsKey(Constants.DATA_ITEM1)); assertTrue("Set "+ Constants.DATA_ITEM2 + " and shouldn't have.", !msg.getData().containsKey(Constants.DATA_ITEM2)); --- 100,106 ---- ActionMessage msg = new ActionMessageBase(); msg.setType(Constants.TYPE_TEST1); ! msg = broadcaster.broadcast(msg); broadcaster.remove(); + System.out.println(msg.toString()); assertTrue("Failed to set data field " + Constants.DATA_ITEM1, msg.getData().containsKey(Constants.DATA_ITEM1)); assertTrue("Set "+ Constants.DATA_ITEM2 + " and shouldn't have.", !msg.getData().containsKey(Constants.DATA_ITEM2)); *************** *** 120,125 **** ActionMessage msg = new ActionMessageBase(); msg.setType(Constants.TYPE_TEST2); ! broadcaster.broadcast(msg); broadcaster.remove(); assertTrue("Failed to set data field " + Constants.DATA_ITEM2, msg.getData().containsKey(Constants.DATA_ITEM2)); assertTrue("Set "+ Constants.DATA_ITEM1 + " and shouldn't have.", !msg.getData().containsKey(Constants.DATA_ITEM1)); --- 113,119 ---- ActionMessage msg = new ActionMessageBase(); msg.setType(Constants.TYPE_TEST2); ! msg = broadcaster.broadcast(msg); broadcaster.remove(); + System.out.println(msg.toString()); assertTrue("Failed to set data field " + Constants.DATA_ITEM2, msg.getData().containsKey(Constants.DATA_ITEM2)); assertTrue("Set "+ Constants.DATA_ITEM1 + " and shouldn't have.", !msg.getData().containsKey(Constants.DATA_ITEM1)); *************** *** 145,148 **** --- 139,145 ---- /* *$Log$ + *Revision 1.5 2002/12/03 15:13:05 heathm + *Fixed test cases so they actually work. + * *Revision 1.4 2002/10/30 00:26:50 heathm *Removed call to setState in messages since the default state is automatically set my the ActionMessageBase constructor. |