Ejemplo n.º 1
0
  @Test
  public void testRelate() throws OseeCoreException {
    when(txData.getWriteable(readable1)).thenReturn(artifact1);
    when(txData.getWriteable(readable2)).thenReturn(artifact2);
    when(txData.getGraph()).thenReturn(graph);

    ArtifactData data = Mockito.mock(ArtifactData.class);
    when(artifact1.getOrcsData()).thenReturn(data);
    when(artifact2.getOrcsData()).thenReturn(data);
    when(data.isUseBackingData()).thenReturn(false);

    txDataManager.relate(txData, readable1, DEFAULT_HIERARCHY, readable2);

    verify(relationManager).relate(session, artifact1, DEFAULT_HIERARCHY, artifact2);
  }