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 AssertMappedConnection extends WriteCommand<ModelingCommandSequenceTest> {
15 private Connect connect;
17 public AssertMappedConnection(Connect connect) {
18 this.connect = connect;
22 protected void run(WriteGraph graph, ModelingCommandSequenceTest environment) throws DatabaseException {
24 Resource element = connect.getResource();
25 Resource component = graph.getPossibleObject(element, ModelingResources.getInstance(graph).ElementToComponent);
26 Assert.assertNotNull(component);