]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.tests/src/org/simantics/modeling/tests/commands/AssertMappedConnection.java
Small but effective HiDPI fixes for platform G2D
[simantics/platform.git] / bundles / org.simantics.modeling.tests / src / org / simantics / modeling / tests / commands / AssertMappedConnection.java
1 package org.simantics.modeling.tests.commands;
2
3 import junit.framework.Assert;
4
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;
11
12
13 public class AssertMappedConnection extends WriteCommand<ModelingCommandSequenceTest> {
14
15         private Connect connect;
16         
17         public AssertMappedConnection(Connect connect) {
18                 this.connect = connect;
19         }
20         
21         @Override
22         protected void run(WriteGraph graph, ModelingCommandSequenceTest environment) throws DatabaseException {
23                 
24         Resource element = connect.getResource();
25         Resource component = graph.getPossibleObject(element, ModelingResources.getInstance(graph).ElementToComponent);
26         Assert.assertNotNull(component);
27         
28         }
29
30 }