Examples of canonicalGet()


Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    final Contact contact = (Contact) contactNode.get(contacts);

    assert rootNode.get(workingAddressBook) == rootNode.canonicalGet(workingAddressBook);
    assert contactsNode.get(addressBook) == contactsNode.canonicalGet(workingAddressBook);
    assert contactNode.get(contacts) == contactNode.canonicalGet(workingAddressBook);
    assert nicknameNode.get(contact) == nicknameNode.canonicalGet(workingAddressBook);
  }

  public static class AddressBook
  {
    private List<Contact> contacts = new LinkedList<Contact>();
View Full Code Here

Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    final DiffNode pinkmanNode = contactsNode.getChild(new CollectionItemElementSelector(jessePinkman));
    assertThat(pinkmanNode.hasChanges(), is(true));

    final DiffNode middleNameNode = pinkmanNode.getChild("middleName");
    assertThat(middleNameNode.hasChanges(), is(true));
    assertThat(middleNameNode.canonicalGet(phoneBook), IsNull.nullValue());
    assertThat((String) middleNameNode.canonicalGet(modifiedPhoneBook), IsEqual.equalTo("Bruce"));

    final DiffNode whiteNode = contactsNode.getChild(new CollectionItemElementSelector(walterWhite));
    assertThat(whiteNode.hasChanges(), is(true));
View Full Code Here

Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    assertThat(pinkmanNode.hasChanges(), is(true));

    final DiffNode middleNameNode = pinkmanNode.getChild("middleName");
    assertThat(middleNameNode.hasChanges(), is(true));
    assertThat(middleNameNode.canonicalGet(phoneBook), IsNull.nullValue());
    assertThat((String) middleNameNode.canonicalGet(modifiedPhoneBook), IsEqual.equalTo("Bruce"));

    final DiffNode whiteNode = contactsNode.getChild(new CollectionItemElementSelector(walterWhite));
    assertThat(whiteNode.hasChanges(), is(true));

    final DiffNode whiteMiddleNameNode = whiteNode.getChild("middleName");
View Full Code Here

Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    final DiffNode whiteNode = contactsNode.getChild(new CollectionItemElementSelector(walterWhite));
    assertThat(whiteNode.hasChanges(), is(true));

    final DiffNode whiteMiddleNameNode = whiteNode.getChild("middleName");
    assertThat(whiteMiddleNameNode.hasChanges(), is(true));
    assertThat(whiteMiddleNameNode.canonicalGet(phoneBook), IsNull.nullValue());
    assertThat((String) whiteMiddleNameNode.canonicalGet(modifiedPhoneBook), IsEqual.equalTo("Hartwell"));
  }
}
View Full Code Here

Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    assertThat(whiteNode.hasChanges(), is(true));

    final DiffNode whiteMiddleNameNode = whiteNode.getChild("middleName");
    assertThat(whiteMiddleNameNode.hasChanges(), is(true));
    assertThat(whiteMiddleNameNode.canonicalGet(phoneBook), IsNull.nullValue());
    assertThat((String) whiteMiddleNameNode.canonicalGet(modifiedPhoneBook), IsEqual.equalTo("Hartwell"));
  }
}
View Full Code Here

Examples of de.danielbechler.diff.node.DiffNode.canonicalGet()

    final DiffNode root = ObjectDifferBuilder.buildDefault().compare(workingA, baseA);
    assertThat(root).child("reference", "reference").isCircular();
    assertThat(root).child("reference", "reference")
        .hasCircularStartPathEqualTo(NodePath.withRoot());

    Assertions.assertThat(root.canonicalGet(workingA))
        .isSameAs(root.getChild("reference").getChild("reference").canonicalGet(workingA));
    Assertions.assertThat(root.getChild("reference").getChild("reference").getCircleStartNode())
        .isSameAs(root);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.