/**
* Tests whether initialLocation() gets called correctly when settings up
* a SimScenario
*
* @throws Exception
*/
@Test
public void testInitialLocation()
throws Exception {
// TODO: If more test cases are added that use Settings, they might
// be run in parallel and break.
// Setup the settings
Settings.initFromStream(
new StringBufferInputStream(INITIAL_LOC_TEST_SETTINGS));
final DTNSimUI ui = new DTNSimUI() {
@Override
protected void runSim() {
super.done();
}
};
// Set the delegate for MovementListenerTestReport
MovementListenerTestReport.setDelegate(new MovementReport());
// Start the DTNSimUI, this will create SimScenario instance with all
// the nodes and reports based on the configuration.
ui.start();
assertEquals("initialLocation() called incorrect number of time.",
INITIAL_LOC_TEST_NODE_COUNT, INITIAL_LOC_CALL_COUNT);
}
MovementListenerTest.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:delay-tolerant-network
作者:
评论列表
文章目录