Examples of clearModel()


Examples of de.hpi.eworld.core.ModelManager.clearModel()

    // run restore test
   
    ModelManager mm = ModelManager.getInstance();
   
    //make sure the model is empty before we add anything
    mm.clearModel();
   
    mm.addModelElement(re1);
    mm.addModelElement(re2);
    mm.addModelElement(re3);
    mm.addModelElement(re4);
View Full Code Here

Examples of de.hpi.eworld.core.ModelManager.clearModel()

   
    //save it to an ewd file
    PersistenceManager.getInstance().saveToFile(EWD_FILE);
   
    //fine, now lets restore the saved objects
    mm.clearModel();
    PersistenceManager.getInstance().loadFromFile(EWD_FILE);
   
    Collection<ModelElement> modelElements = mm.getAllModelElements();
    Assert.assertEquals(9, modelElements.size());
View Full Code Here

Examples of de.hpi.eworld.core.ModelManager.clearModel()

   * Loads it afterwards to check if all attributes are restored correctly
   */
  @Test
  public void testSaveAndRestore() {
    ModelManager modelManager = ModelManager.getInstance();
    modelManager.clearModel();

    // save
    modelManager.addModelElement(pos1);

    PersistenceManager.getInstance().saveToFile(EWD_FILE);
View Full Code Here

Examples of de.hpi.eworld.core.ModelManager.clearModel()

    modelManager.addModelElement(pos1);

    PersistenceManager.getInstance().saveToFile(EWD_FILE);

    // restore
    modelManager.clearModel();
    PersistenceManager.getInstance().loadFromFile(EWD_FILE);
    for (ModelElement modelElement : modelManager.getAllModelElements()) {
      GlobalPosition restoredPos1 = (GlobalPosition)modelElement;
      Assert.assertEquals(pos1.getLatitude(), restoredPos1.getLatitude(), 0.0001);
    }
View Full Code Here

Examples of de.hpi.eworld.core.ModelManager.clearModel()

  public void additionalInfoRetrievalTest() {
    //setup testcase
    ArrayList<ModelElement> allElements = TestCaseUtil
        .createSampleTestcase();
    ModelManager mm = ModelManager.getInstance();
    mm.clearModel();

    StatisticsDataManager smm = StatisticsDataManager.getInstance();
    smm.clear();
    EdgeModel testEdge = null;
View Full Code Here

Examples of de.hpi.eworld.core.ModelManager.clearModel()

    HashMap<String, TrafficLightModel> eTrafficLights = new HashMap<String, TrafficLightModel>();
    HashMap<String, WayModel> eWays = new HashMap<String, WayModel>();

    ModelManager model = ModelManager.getInstance();
   
    model.clearModel();

    model.setChanged();
    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    model.clearChanged();
   
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.