Ejemplo n.º 1
0
  @Test
  public void testSetRationale() throws OseeCoreException {
    String rationale = "i have no rationale";

    when(txData.getWriteable(readable1)).thenReturn(artifact1);
    when(txData.getWriteable(readable2)).thenReturn(artifact3);

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

    txDataManager.setRationale(txData, readable1, DEFAULT_HIERARCHY, readable2, rationale);

    verify(relationManager)
        .setRationale(session, artifact1, DEFAULT_HIERARCHY, artifact3, rationale);
  }