Пример #1
0
  /**
   * 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));
  }
Пример #2
0
 @Before
 public void setUp() throws Exception {
   MyContainer container = new MyContainer();
   setFixture(GraphFactory.createIdentifier(container, "myId"));
 }