Ejemplo n.º 1
0
  @Test
  public void testUnrelate() 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.unrelate(txData, readable1, DEFAULT_HIERARCHY, readable2);

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