Package de.danielbechler.diff

Examples of de.danielbechler.diff.ObjectDifferBuilder.comparison()


    final EncompassingClass working = new EncompassingClass(prop2);

    final ObjectDifferBuilder builder = ObjectDifferBuilder.startBuilding();

    // (Option 1) Causes the ObjectDiffer to compare using the method "getProp1" on the 'prop' property of the root object
    builder.comparison()
        .ofNode(NodePath.with("prop"))
        .toUseEqualsMethodOfValueProvidedByMethod("getProp1");

    final DiffNode node = builder.build().compare(working, base);
View Full Code Here


    final List<String> propertyNames = asList("things", "include");
    ObjectDifferBuilder builder = ObjectDifferBuilder.startBuilding();
    for (final String name : propertyNames)
    {
      final NodePath nodePath = NodePath.with(name);
      builder.comparison().ofNode(nodePath).toUseEqualsMethod();
      builder.inclusion().include().node(nodePath);
    }

    final Thing thingOne = new Thing("a", "b");
    final Thing thingTwo = new Thing("aa", "bb");
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.