Package de.hpi.eworld.simulationstatistic.model

Examples of de.hpi.eworld.simulationstatistic.model.StatisticsDataManager.clear()


  @Test
  public void testModelManagerCreation() {
    StatisticsDataManager mm = StatisticsDataManager.getInstance();
    Assert.assertSame(mm, StatisticsDataManager.getInstance());
    // clear manager to avoid side effects from other tests
    mm.clear();

    Assert.assertNull(mm.getLastDataset());
    Assert.assertEquals(0, mm.numDatasets());
    Assert.assertEquals(0, mm.getDatasets().size());
  }
View Full Code Here


    Assert.assertNull(mm.getDataset(model3.getId()));
    Assert.assertEquals(2, mm.numDatasets());
    Assert.assertSame(model1, mm.getDataset(model1.getId()));
    Assert.assertSame(model2, mm.getDataset(model2.getId()));

    mm.clear();
    Assert.assertNull(mm.getLastDataset());
    Assert.assertNull(mm.getDataset(model3.getId()));
    Assert.assertNull(mm.getDataset(model2.getId()));
    Assert.assertNull(mm.getDataset(model1.getId()));
    Assert.assertEquals(0, mm.numDatasets());
View Full Code Here

        .createSampleTestcase();
    ModelManager mm = ModelManager.getInstance();
    mm.clearModel();

    StatisticsDataManager smm = StatisticsDataManager.getInstance();
    smm.clear();
    EdgeModel testEdge = null;

    // create 2 dummy models
    StatDataset model1 = new StatDataset();
    model1.setBelongsToCurrentMap(true);
View Full Code Here

        testEdge.getInternalID());
    Assert.assertFalse((testStatEdge.getValue(Value.MAXSPEED) == 0));
    Assert.assertFalse((testStatEdge.getValue(Value.MINSPEED) == 0));
    Assert.assertNotNull(testStatEdge.getStreetName());

    smm.clear();
    smm.addDataset(model2);
    testStatEdge = model2.getInterval(0).getStatEdge(
        testEdge.getInternalID());
    Assert.assertFalse((testStatEdge.getValue(Value.MAXSPEED) == 0));
    Assert.assertFalse((testStatEdge.getValue(Value.MINSPEED) == 0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.