Examples of ItemReporter


Examples of com.google.common.testing.RelationshipTester.ItemReporter

  private final List<T> items = Lists.newArrayList();

  private EquivalenceTester(Equivalence<? super T> equivalence) {
    this.equivalence = checkNotNull(equivalence);
    this.delegate = new RelationshipTester<T>(
        equivalence, "equivalent", "hash", new ItemReporter());
  }
View Full Code Here

Examples of com.google.common.testing.RelationshipTester.ItemReporter

*/
public class RelationshipTesterTest extends TestCase {

  public void testNulls() {
    new ClassSanityTester()
        .setDefault(ItemReporter.class, new ItemReporter())
        .testNulls(RelationshipTester.class);
  }
View Full Code Here

Examples of com.google.common.testing.RelationshipTester.ItemReporter

    Object instance = createInstance(factory, args);
    List<Object> equalArgs = generateEqualFactoryArguments(factory, params, args);
    // Each group is a List of items, each item has a list of factory args.
    final List<List<List<Object>>> argGroups = Lists.newArrayList();
    argGroups.add(ImmutableList.of(args, equalArgs));
    EqualsTester tester = new EqualsTester(new ItemReporter() {
      @Override String reportItem(Item<?> item) {
        List<Object> factoryArgs = argGroups.get(item.groupNumber).get(item.itemNumber);
        return factory.getName() + "(" + Joiner.on(", ").useForNull("null").join(factoryArgs) + ")";
      }
    });
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.