コード例 #1
0
ファイル: AmendmentTest.java プロジェクト: NCIP/psc
  public void testCloneDeepClonesPreviousAmendments() throws Exception {
    Amendment src = Fixtures.createAmendments("C", "B", "A");
    Amendment clone = src.clone();

    assertNotSame(
        "Previous amendment not cloned", src.getPreviousAmendment(), clone.getPreviousAmendment());
    assertNotSame(
        "Previous previous amendment not cloned",
        src.getPreviousAmendment().getPreviousAmendment(),
        clone.getPreviousAmendment().getPreviousAmendment());
  }
コード例 #2
0
ファイル: AmendmentTest.java プロジェクト: NCIP/psc
 public void testSetMemOnlyRecursiveToPreviousAmendments() throws Exception {
   Amendment amendment = Fixtures.createAmendments("C", "B", "A");
   amendment.setMemoryOnly(true);
   assertTrue(amendment.getPreviousAmendment().isMemoryOnly());
 }