1 package org.simantics.db.tests.api.readGraph.getInverse;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.primitiverequest.Inverse;
6 import org.simantics.db.exception.NoInverseException;
7 import org.simantics.db.testing.base.ExistingDatabaseTest;
8 import org.simantics.db.tests.common.Writes;
11 * When a resource does not specify L0.InverseOf, getInverse shall throw NoInverseException.
13 public class GetInverseTest1 extends ExistingDatabaseTest {
16 public void test() throws Exception{
18 Resource resource = getSession().syncRequest(Writes.newEmpty());
21 assertNotNull("Null not allowed",getSession().syncRequest(new Inverse(resource)));
22 } catch (NoInverseException e) {
25 fail("Should throw.");