com.google.common.testing.NullPointerTester.Visibility Java Examples
The following examples show how to use
com.google.common.testing.NullPointerTester.Visibility.
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: ProcessThreadMetricsTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() { final ProcessThreadMetrics uut = new ProcessThreadMetrics(status); final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #2
Source File: ProcessMemoryMetricsTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() { final ProcessMemoryMetrics uut = new ProcessMemoryMetrics(status); final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #3
Source File: ProcfsStatusTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() { final ProcfsStatus uut = new ProcfsStatus(mock(ProcfsReader.class)); final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #4
Source File: ProcfsEntryTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() { final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #5
Source File: ProcfsReaderTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() throws Exception { final ProcfsReader uut = new ProcfsReader(BASE, "smaps-001.txt"); final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #6
Source File: ProcfsSmapsTest.java From micrometer-jvm-extras with Apache License 2.0 | 5 votes |
@Test public void testNullContract() { final ProcfsSmaps uut = new ProcfsSmaps(mock(ProcfsReader.class)); final NullPointerTester npt = new NullPointerTester(); npt.testConstructors(uut.getClass(), Visibility.PACKAGE); npt.testStaticMethods(uut.getClass(), Visibility.PACKAGE); npt.testInstanceMethods(uut, Visibility.PACKAGE); }
Example #7
Source File: CcCompilationHelperTest.java From bazel with Apache License 2.0 | 5 votes |
@Test public void testConstructorThrowsNPE() throws Exception { ConfiguredTarget target = scratchConfiguredTarget("a", "b", "cc_library(name = 'b', srcs = [],)"); RuleContext ruleContext = getRuleContext(target); CcToolchainProvider ccToolchain = CppHelper.getToolchainUsingDefaultCcToolchainAttribute(ruleContext); FdoContext fdoContext = ccToolchain.getFdoContext(); Artifact grepIncludes = getBinArtifact("grep_includes", target); NullPointerTester tester = new NullPointerTester() .setDefault(RuleContext.class, ruleContext) .setDefault(CcCommon.class, new CcCommon(ruleContext)) .setDefault(CppSemantics.class, MockCppSemantics.INSTANCE) .setDefault(CcToolchainProvider.class, ccToolchain) .setDefault(BuildConfiguration.class, ruleContext.getConfiguration()) .setDefault(FdoContext.class, fdoContext) .setDefault(Label.class, ruleContext.getLabel()) .setDefault(Artifact.class, grepIncludes) .setDefault(CcCompilationOutputs.class, CcCompilationOutputs.builder().build()); tester.testConstructors(CcCompilationHelper.class, Visibility.PACKAGE); tester.testAllPublicInstanceMethods( new CcCompilationHelper( ruleContext, ruleContext, target.getLabel(), /* grepIncludes= */ null, MockCppSemantics.INSTANCE, FeatureConfiguration.EMPTY, ccToolchain, fdoContext, /* executionInfo= */ ImmutableMap.of(), /* shouldProcessHeaders= */ true)); }
Example #8
Source File: ClassFileTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester() .setDefault(ClassPathEntry.class, new ClassPathEntry(Paths.get("foo", "bar.jar"))) .testConstructors(ClassFile.class, Visibility.PACKAGE); }
Example #9
Source File: SuperClassSymbolTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester().testConstructors(SuperClassSymbol.class, Visibility.PACKAGE); }
Example #10
Source File: MethodSymbolTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester().testConstructors(MethodSymbol.class, Visibility.PACKAGE); }
Example #11
Source File: SymbolProblemTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester() .setDefault(Symbol.class, new ClassSymbol("java.lang.Integer")) .testConstructors(SymbolProblem.class, Visibility.PACKAGE); }
Example #12
Source File: ClassSymbolTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester().testConstructors(ClassSymbol.class, Visibility.PACKAGE); }
Example #13
Source File: SymbolReferencesTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester().testConstructors(SymbolReferences.class, Visibility.PACKAGE); }
Example #14
Source File: FieldSymbolTest.java From cloud-opensource-java with Apache License 2.0 | 4 votes |
@Test public void testNull() { new NullPointerTester().testConstructors(FieldSymbol.class, Visibility.PACKAGE); }