Search in sources :

Example 71 with NullPointerTester

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

the class IteratorsTest method testNullPointerExceptions.

// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Iterators.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 72 with NullPointerTester

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

the class ObjectArraysTest method testNullPointerExceptions.

// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ObjectArrays.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 73 with NullPointerTester

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

the class RangeNonGwtTest method testNullPointers.

public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicInstanceMethods(Range.all());
    tester.testAllPublicInstanceMethods(Range.open(1, 3));
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester)

Example 74 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project core-java by SpineEventEngine.

the class MessagesShould method pass_the_null_tolerance_check.

@Test
public void pass_the_null_tolerance_check() {
    final NullPointerTester tester = new NullPointerTester();
    tester.testStaticMethods(Messages.class, NullPointerTester.Visibility.PACKAGE);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

Example 75 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project google-cloud-java by GoogleCloudPlatform.

the class CloudStorageFileSystemTest method testNullness.

@Test
public void testNullness() throws IOException, NoSuchMethodException, SecurityException {
    try (FileSystem fs = FileSystems.getFileSystem(URI.create("gs://bucket"))) {
        NullPointerTester tester = new NullPointerTester().ignore(CloudStorageFileSystem.class.getMethod("equals", Object.class)).setDefault(CloudStorageConfiguration.class, CloudStorageConfiguration.DEFAULT).setDefault(StorageOptions.class, LocalStorageHelper.getOptions());
        tester.testAllPublicStaticMethods(CloudStorageFileSystem.class);
        tester.testAllPublicInstanceMethods(fs);
    }
}
Also used : FileSystem(java.nio.file.FileSystem) NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

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