Examples of testAllPublicInstanceMethods()


Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Splitter.class);
    tester.testAllPublicInstanceMethods(Splitter.on(","));
    tester.testAllPublicInstanceMethods(Splitter.on(",").trimResults());
  }

  public void testMapSplitter_trimmedBoth() {
    Map<String, String> m = COMMA_SPLITTER
        .trimResults()
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  @GwtIncompatible("NullPointerTester")
  public void testStaticNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(CharMatcher.class);
    tester.testAllPublicInstanceMethods(CharMatcher.ANY);
    tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
  }

  private static final CharMatcher WHATEVER = new CharMatcher() {
    @Override public boolean matches(char c) {
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  @GwtIncompatible("NullPointerTester")
  public void testStaticNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(CharMatcher.class);
    tester.testAllPublicInstanceMethods(CharMatcher.ANY);
    tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
  }

  private static final CharMatcher WHATEVER = new CharMatcher() {
    @Override public boolean matches(char c) {
      throw new AssertionFailedError(
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  }

  @GwtIncompatible("NullPointerTester")
  private void doTestNull(CharMatcher matcher) throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(matcher);
  }

  public void testNoMatches() {
    doTestNoMatches(CharMatcher.NONE, "blah");
    doTestNoMatches(is('a'), "bcde");
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

    } catch (IllegalArgumentException expected) {}
  }

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(BloomFilter.create(Funnels.unencodedCharsFunnel(), 100));
    tester.testAllPublicStaticMethods(BloomFilter.class);
  }

  /**
   * Tests that we never get an optimal hashes number of zero.
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

    assertEquals(expectedHash, out.hash());
  }

  public void testChecksForNull() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(
        new HashingOutputStream(Hashing.md5(), new ByteArrayOutputStream()));
    tester.testAllPublicStaticMethods(HashingOutputStream.class);
    tester.testAllPublicConstructors(HashingOutputStream.class);
  }
}
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  }

  public void testChecksForNull() throws Exception {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicInstanceMethods(new HashingInputStream(Hashing.md5(), buffer));
    tester.testAllPublicStaticMethods(HashingInputStream.class);
    tester.testAllPublicConstructors(HashingInputStream.class);
  }
}
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() {
    NullPointerTester npTester = new NullPointerTester();
    npTester.testAllPublicConstructors(Optional.class);
    npTester.testAllPublicStaticMethods(Optional.class);
    npTester.testAllPublicInstanceMethods(Optional.absent());
    npTester.testAllPublicInstanceMethods(Optional.of("training"));
  }
}
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  public void testNullPointers() {
    NullPointerTester npTester = new NullPointerTester();
    npTester.testAllPublicConstructors(Optional.class);
    npTester.testAllPublicStaticMethods(Optional.class);
    npTester.testAllPublicInstanceMethods(Optional.absent());
    npTester.testAllPublicInstanceMethods(Optional.of("training"));
  }
}
View Full Code Here

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()

  @GwtIncompatible("NullPointerTester")
  public void testNulls() {
    final NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicStaticMethods(InternetDomainName.class);
    tester.testAllPublicInstanceMethods(InternetDomainName.from("google.com"));
  }
}
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.