|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttest.TestUtils
public class TestUtils
Generic convenience methods for tests.
| Constructor Summary | |
|---|---|
TestUtils(java.util.List<ConnectionListener> cl,
java.util.List<MessageListener> ml,
Settings settings)
Creates a test utils object suitable for creating new hosts. |
|
| Method Summary | |
|---|---|
DTNHost |
createHost()
Creates a host to location (0,0) with stationary movement model and default name. |
DTNHost |
createHost(Coord loc)
Creates a host to a location with stationary movement model and default name. |
DTNHost |
createHost(Coord loc,
java.lang.String name)
Creates a host to a location with stationary movement model and MessageRouter router. |
DTNHost |
createHost(MovementModel mmProto,
java.lang.String name)
Creates a host with defined movement model |
java.util.List<DTNHost> |
getAllHosts()
|
void |
setConListeners(java.util.List<ConnectionListener> conListeners)
|
void |
setGroupId(java.lang.String groupId)
|
void |
setMessageRouterProto(MessageRouter mr)
|
void |
setMsgListeners(java.util.List<MessageListener> msgListeners)
|
void |
setTransmitRange(int transmitRange)
|
void |
setTransmitSpeed(int transmitSpeed)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestUtils(java.util.List<ConnectionListener> cl,
java.util.List<MessageListener> ml,
Settings settings)
cl - Connection listeners for the hostsml - Message -"-settings - Setting object given to message router| Method Detail |
|---|
public void setMessageRouterProto(MessageRouter mr)
public void setConListeners(java.util.List<ConnectionListener> conListeners)
conListeners - the ConnectionListeners to setpublic void setGroupId(java.lang.String groupId)
groupId - the groupId to setpublic void setMsgListeners(java.util.List<MessageListener> msgListeners)
msgListeners - the MessageListeners to setpublic void setTransmitRange(int transmitRange)
transmitRange - the transmitRange to setpublic void setTransmitSpeed(int transmitSpeed)
transmitSpeed - the transmitSpeed to set
public DTNHost createHost(Coord loc,
java.lang.String name)
loc - The location of the hostname - Name of the host (or null for default)
public DTNHost createHost(MovementModel mmProto,
java.lang.String name)
mmProto - The prototy of the movement modelname - name of the host
public DTNHost createHost(Coord loc)
loc - The location of the host
public DTNHost createHost()
public java.util.List<DTNHost> getAllHosts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||