Search in sources :

Example 41 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class BigIntegerMathTest method testNullPointers.

// NullPointerTester
@GwtIncompatible
public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(BigInteger.class, ONE);
    tester.setDefault(int.class, 1);
    tester.setDefault(long.class, 1L);
    tester.testAllPublicStaticMethods(BigIntegerMath.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 42 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class HashingOutputStreamTest method testChecksForNull.

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);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) ByteArrayOutputStream(java.io.ByteArrayOutputStream)

Example 43 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)

Example 44 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by hceylan.

the class UnsignedBytesTest method testNulls.

public void testNulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(byte[].class, new byte[0]);
    tester.testAllPublicStaticMethods(UnsignedBytes.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester)

Example 45 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by hceylan.

the class UnsignedIntegerTest method testNulls.

@GwtIncompatible("NullPointerTester")
public void testNulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(UnsignedInteger.class, UnsignedInteger.ONE);
    tester.testAllPublicStaticMethods(UnsignedInteger.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Aggregations

NullPointerTester (com.google.common.testing.NullPointerTester)171 GwtIncompatible (com.google.common.annotations.GwtIncompatible)100 Test (org.junit.Test)26 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 TestActorRequestFactory (io.spine.client.TestActorRequestFactory)1 Command (io.spine.core.Command)1 EventEnvelope (io.spine.core.EventEnvelope)1 AnAggregateRoot (io.spine.server.aggregate.given.AggregateRootTestEnv.AnAggregateRoot)1 TestEventFactory (io.spine.server.command.TestEventFactory)1