1 package org.simantics.modeling.tests.commands;
3 import junit.framework.Assert;
5 import org.simantics.db.Resource;
6 import org.simantics.db.WriteGraph;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.db.testing.common.WriteCommand;
9 import org.simantics.modeling.ModelingResources;
10 import org.simantics.modeling.tests.cases.ModelingCommandSequenceTest;
13 public class AssertMappedComponent extends WriteCommand<ModelingCommandSequenceTest> {
15 private AddModule module;
17 public AssertMappedComponent(AddModule module) {
22 protected void run(WriteGraph graph, ModelingCommandSequenceTest environment) throws DatabaseException {
24 Resource element = module.getResource();
25 Resource component = graph.getPossibleObject(element, ModelingResources.getInstance(graph).ElementToComponent);
26 Assert.assertNotNull(component);