Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19002/src/test/net/sf/asterisk/manager/impl
Modified Files:
EventBuilderImplTest.java
Log Message:
Added SIPPeersAction and SIPShowPeerAction and corresponding events PeerEntryEvent and PeerlistCompleteEvent
Index: EventBuilderImplTest.java
===================================================================
RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl/EventBuilderImplTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -p -r1.3 -r1.4
--- EventBuilderImplTest.java 21 Apr 2005 23:34:41 -0000 1.3
+++ EventBuilderImplTest.java 18 Jul 2005 14:53:25 -0000 1.4
@@ -183,6 +183,40 @@ public class EventBuilderImplTest extend
.getRestart());
}
+ public void testBuildEventWithBooleanPropertyOfValueYes()
+ {
+ Map properties = new HashMap();
+ ShutdownEvent event;
+
+ eventBuilder.registerEventClass(ShutdownEvent.class);
+ properties.put("event", "shutdown");
+ properties.put("restart", "yes");
+ event = (ShutdownEvent) eventBuilder.buildEvent(this, properties);
+
+ assertNotNull(event);
+ assertEquals("Returned event is of wrong type", ShutdownEvent.class,
+ event.getClass());
+ assertEquals("Boolean property not set correctly", Boolean.TRUE, event
+ .getRestart());
+ }
+
+ public void testBuildEventWithBooleanPropertyOfValueNo()
+ {
+ Map properties = new HashMap();
+ ShutdownEvent event;
+
+ eventBuilder.registerEventClass(ShutdownEvent.class);
+ properties.put("event", "shutdown");
+ properties.put("restart", "NO");
+ event = (ShutdownEvent) eventBuilder.buildEvent(this, properties);
+
+ assertNotNull(event);
+ assertEquals("Returned event is of wrong type", ShutdownEvent.class,
+ event.getClass());
+ assertEquals("Boolean property not set correctly", Boolean.FALSE, event
+ .getRestart());
+ }
+
public void testBuildEventWithUnregisteredEvent()
{
Map properties = new HashMap();
|