/** * Checks that {@link IdentifiableElement} and {@link Identifier} are always correctly connected. */ @Test public void testCheckOpposite() { MyContainer newContainer = new MyContainer(); Identifier id = GraphFactory.createIdentifier(newContainer, SaltUtil.LABEL_ID); assertEquals(newContainer.getIdentifier(), id); newContainer.setId("newId"); assertFalse(newContainer.equals(id)); }
@Before public void setUp() throws Exception { MyContainer container = new MyContainer(); setFixture(GraphFactory.createIdentifier(container, "myId")); }