Package org.jtester.hamcrest.matcher.property.difference

Examples of org.jtester.hamcrest.matcher.property.difference.ClassDifference


  public Difference compare(Object left, Object right, boolean onlyFirstDifference,
      ReflectionComparator reflectionComparator) {
    // check different class type
    Class clazz = left.getClass();
    if (!clazz.isAssignableFrom(right.getClass())) {
      return new ClassDifference("Different classes. Left: " + clazz + ", right: " + right.getClass(), left,
          right, left.getClass(), right.getClass());
    }
    // compare all fields of the object using reflection
    ObjectDifference difference = new ObjectDifference("Different field values", left, right);
    compareFields(left, right, clazz, difference, onlyFirstDifference, reflectionComparator);
View Full Code Here

TOP

Related Classes of org.jtester.hamcrest.matcher.property.difference.ClassDifference

Copyright © 2018 www.massapicom. 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.