Commit 20477cd1 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

refactor of unit test to match new class names

parent d9101c0a
......@@ -14,8 +14,8 @@ import lcsb.mapviewer.model.map.model.ElementSubmodelConnection;
import lcsb.mapviewer.model.map.model.Model;
import lcsb.mapviewer.model.map.model.ModelFullIndexed;
import lcsb.mapviewer.model.map.model.SubmodelType;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.SimpleMolecule;
import lcsb.mapviewer.model.map.species.Species;
import lcsb.mapviewer.persist.PersistTestFunctions;
......@@ -50,17 +50,17 @@ public class AliasDaoTest extends PersistTestFunctions {
Model model = createModel();
project.addModel(model);
Species alias = (Species) model.getElementByElementId("sa2");
Element element = model.getElementByElementId("sa2");
alias.getSearchIndexes().add(new SearchIndex("blabla"));
element.getSearchIndexes().add(new SearchIndex("blabla"));
modelDao.add(model);
Model model2 = new ModelFullIndexed(modelDao.getById(model.getId()));
Species alias2 = (Species) elementDao.getById(model2.getElementByElementId("sa2").getId());
Element element2 = elementDao.getById(model2.getElementByElementId("sa2").getId());
assertEquals(1, alias2.getSearchIndexes().size());
assertEquals(1, element2.getSearchIndexes().size());
modelDao.delete(model);
} catch (Exception e) {
......@@ -127,9 +127,9 @@ public class AliasDaoTest extends PersistTestFunctions {
long count = modelDao.getCount();
Model model = createModel();
Model model1 = createModel();
Element alias = model.getElementByElementId("sa2");
Element element = model.getElementByElementId("sa2");
ElementSubmodelConnection submodel = new ElementSubmodelConnection(model1, SubmodelType.UNKNOWN);
alias.setSubmodel(submodel);
element.setSubmodel(submodel);
project.addModel(model);
projectDao.add(project);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment