Examples of NullPointerTester


Examples of com.google.common.testing.NullPointerTester

        Suppliers.synchronizedSupplier(Suppliers.ofInstance(5))).get());
  }

  @GwtIncompatible("NullPointerTest")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Suppliers.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    }
  }

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

Examples of com.google.common.testing.NullPointerTester

        new DontStringMeBro(), null, new DontStringMeBro()));
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(StringBuilder.class, new StringBuilder());
    tester.testAllPublicStaticMethods(Joiner.class);
    tester.testAllPublicInstanceMethods(Joiner.on(","));
    tester.testAllPublicInstanceMethods(Joiner.on(",").skipNulls());
    tester.testAllPublicInstanceMethods(Joiner.on(",").useForNull("x"));
    tester.testAllPublicInstanceMethods(
        Joiner.on(",").withKeyValueSeparator("="));
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {

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

Examples of com.google.common.testing.NullPointerTester

    assertEquals(0, matcher.countIn(""));
  }

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

Examples of com.google.common.testing.NullPointerTester

    // Predicate<Integer> p4 = Predicates.<Integer>in(nums);
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Predicates.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    assertFalse(isFoobar.apply("Foobarx"));
  }

  @GwtIncompatible("NullPointerTester")
  public void testContainsPattern_nulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    Predicate<CharSequence> isWooString = Predicates.containsPattern("Woo");

    tester.testAllPublicInstanceMethods(isWooString);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    tester.testAllPublicInstanceMethods(isWooString);
  }

  @GwtIncompatible("NullPointerTester")
  public void testContains_nulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    Predicate<CharSequence> isWooPattern =
        Predicates.contains(Pattern.compile("Woo"));

    tester.testAllPublicInstanceMethods(isWooPattern);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    }
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Strings.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    } catch (UnsupportedOperationException expected) {
    }
  }

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(Throwable.class, new SomeCheckedException());
    tester.setDefault(Class.class, SomeCheckedException.class);
    tester.testAllPublicStaticMethods(Throwables.class);
  }
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.