Java Code Examples for com.google.common.testing.NullPointerTester#testAllPublicConstructors()
The following examples show how to use
com.google.common.testing.NullPointerTester#testAllPublicConstructors() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormFieldExceptionTest.java From nomulus with Apache License 2.0 | 5 votes |
@Test public void testNullness() { NullPointerTester tester = new NullPointerTester() .setDefault(FormField.class, FormField.named("love").build()); tester.testAllPublicConstructors(FormFieldException.class); tester.testAllPublicStaticMethods(FormFieldException.class); tester.testAllPublicInstanceMethods(new FormFieldException("lol")); }
Example 2
Source File: MediaTypeTest.java From armeria with Apache License 2.0 | 5 votes |
@Test // com.google.common.testing.NullPointerTester public void testNullPointer() { final NullPointerTester tester = new NullPointerTester(); tester.testAllPublicConstructors(MediaType.class); tester.testAllPublicStaticMethods(MediaType.class); tester.testAllPublicInstanceMethods(MediaType.parse("text/plain")); }
Example 3
Source File: CidrAddressBlockTest.java From nomulus with Apache License 2.0 | 4 votes |
public void testNulls() { NullPointerTester tester = new NullPointerTester(); tester.testAllPublicStaticMethods(CidrAddressBlock.class); tester.testAllPublicConstructors(CidrAddressBlock.class); tester.testAllPublicInstanceMethods(new CidrAddressBlock("::/0")); }
Example 4
Source File: ExtraDataListTest.java From bazel with Apache License 2.0 | 4 votes |
@Test public void testNulls() { NullPointerTester tester = new NullPointerTester(); tester.testAllPublicConstructors(ExtraDataList.class); tester.testAllPublicInstanceMethods(new ExtraDataList()); }
Example 5
Source File: ZipFileEntryTest.java From bazel with Apache License 2.0 | 4 votes |
@Test public void testNulls() { NullPointerTester tester = new NullPointerTester(); tester.testAllPublicConstructors(ZipFileEntry.class); tester.testAllPublicInstanceMethods(new ZipFileEntry("foo")); }
Example 6
Source File: ZipFileDataTest.java From bazel with Apache License 2.0 | 4 votes |
@Test public void testNulls() { NullPointerTester tester = new NullPointerTester(); tester.testAllPublicConstructors(ZipFileData.class); tester.testAllPublicInstanceMethods(data); }