Package com.google.common.testing

Examples of com.google.common.testing.ForwardingWrapperTester


    }, "add(", "exception");
  }

  public void testNotInterfaceType() {
    try {
      new ForwardingWrapperTester().testForwarding(String.class, Functions.<String>identity());
      fail();
    } catch (IllegalArgumentException expected) {}
  }
View Full Code Here


  }

  public void testNulls() {
    new NullPointerTester()
        .setDefault(Class.class, Runnable.class)
        .testAllPublicInstanceMethods(new ForwardingWrapperTester());
  }
View Full Code Here

      return delegate.toString();
    }
  }

  public void testCovariantReturn() {
    new ForwardingWrapperTester().testForwarding(Sub.class, new Function<Sub, Sub>() {
      @Override public Sub apply(Sub sub) {
        return new ForwardingSub(sub);
      }
    });
  }
View Full Code Here

      return delegate.toString();
    }
  }

  public void testExplicitEqualsAndHashCodeNotDelegatedByDefault() {
    new ForwardingWrapperTester()
        .testForwarding(Equals.class, NoDelegateToEquals.WRAPPER);
  }
View Full Code Here

        .testForwarding(Equals.class, NoDelegateToEquals.WRAPPER);
  }

  public void testExplicitEqualsAndHashCodeDelegatedWhenExplicitlyAsked() {
    try {
      new ForwardingWrapperTester()
          .includingEquals()
          .testForwarding(Equals.class, NoDelegateToEquals.WRAPPER);
    } catch (AssertionError expected) {
      return;
    }
View Full Code Here

TOP

Related Classes of com.google.common.testing.ForwardingWrapperTester

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.