Search in sources :

Example 1 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project caffeine by ben-manes.

the class CacheBuilderTest method testNullParameters.

@GwtIncompatible("NullPointerTester")
public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    Caffeine<Object, Object> builder = Caffeine.newBuilder();
    tester.testAllPublicInstanceMethods(builder);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 2 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project caffeine by ben-manes.

the class LocalLoadingCacheTest method testNullParameters.

// null parameters test
public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    CacheLoader<Object, Object> loader = identityLoader();
    tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester)

Example 3 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project bazel by bazelbuild.

the class ZipFileDataTest method testNulls.

@Test
public void testNulls() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicConstructors(ZipFileData.class);
    tester.testAllPublicInstanceMethods(data);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

Example 4 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project bazel by bazelbuild.

the class ZipFileEntryTest method testNulls.

@Test
public void testNulls() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicConstructors(ZipFileEntry.class);
    tester.testAllPublicInstanceMethods(new ZipFileEntry("foo"));
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

Example 5 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project bazel by bazelbuild.

the class ImmutableSortedKeyMapTest method nullPointers.

@Test
public void nullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedKeyMap.class);
    tester.testAllPublicInstanceMethods(new ImmutableSortedKeyMap.Builder<String, Object>());
    tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.<String, Integer>of());
    tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.of("one", 1));
    tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.of("one", 1, "two", 2));
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

Aggregations

NullPointerTester (com.google.common.testing.NullPointerTester)165 GwtIncompatible (com.google.common.annotations.GwtIncompatible)100 Test (org.junit.Test)20 UnhashableObject (com.google.common.collect.testing.UnhashableObject)2 BoundedContext (io.spine.server.BoundedContext)2 FileSystem (java.nio.file.FileSystem)2 Sets.newEnumSet (com.google.common.collect.Sets.newEnumSet)1 Sets.newHashSet (com.google.common.collect.Sets.newHashSet)1 Sets.powerSet (com.google.common.collect.Sets.powerSet)1 AnEnum (com.google.common.collect.testing.AnEnum)1 SafeTreeSet (com.google.common.collect.testing.SafeTreeSet)1 ExecutionList (com.google.common.util.concurrent.ExecutionList)1 BuildConfiguration (com.google.devtools.build.lib.analysis.config.BuildConfiguration)1 FieldDescriptor (com.google.protobuf.Descriptors.FieldDescriptor)1 StringValue (com.google.protobuf.StringValue)1 AggregatePart.getConstructor (io.spine.server.aggregate.AggregatePart.getConstructor)1 MessageWithStringValue (io.spine.test.messages.MessageWithStringValue)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1 Constructor (java.lang.reflect.Constructor)1