use of edu.umd.cs.findbugs.BugCollection in project guava-helper-for-java-8 by KengoTODA.
the class DependencyOnDeprecatedGuavaClassDetectorTest method detectFieldWithInitializationGuava.
@Test
public void detectFieldWithInitializationGuava() {
spotbugs.addAuxClasspathEntry(Paths.get(System.getProperty("user.home"), ".m2/repository/com/google/guava/guava/21.0/guava-21.0.jar"));
BugCollection detected = spotbugs.performAnalysis(Paths.get("target", "test-classes", "jp", "skypencil", "guava", "GuavaOptionalFieldWithInitialization.class"));
assertThat(detected, containsExactly(1, MATCHER));
}
use of edu.umd.cs.findbugs.BugCollection in project guava-helper-for-java-8 by KengoTODA.
the class DependencyOnDeprecatedGuavaClassDetectorTest method detectInvoking.
@Test
public void detectInvoking() {
spotbugs.addAuxClasspathEntry(Paths.get(System.getProperty("user.home"), ".m2/repository/com/google/guava/guava/21.0/guava-21.0.jar"));
BugCollection detected = spotbugs.performAnalysis(Paths.get("target", "test-classes", "jp", "skypencil", "guava", "Java8OptionalMethodInvoking.class"));
assertThat(detected, containsExactly(0, MATCHER));
}
use of edu.umd.cs.findbugs.BugCollection in project guava-helper-for-java-8 by KengoTODA.
the class DependencyOnDeprecatedGuavaClassDetectorTest method detectField.
@Test
public void detectField() {
spotbugs.addAuxClasspathEntry(Paths.get(System.getProperty("user.home"), ".m2/repository/com/google/guava/guava/21.0/guava-21.0.jar"));
BugCollection detected = spotbugs.performAnalysis(Paths.get("target", "test-classes", "jp", "skypencil", "guava", "Java8OptionalField.class"));
assertThat(detected, containsExactly(0, MATCHER));
}
use of edu.umd.cs.findbugs.BugCollection in project guava-helper-for-java-8 by KengoTODA.
the class DependencyOnDeprecatedGuavaClassDetectorTest method detectReturnedTypeInInterfaceGuava.
@Test
public void detectReturnedTypeInInterfaceGuava() {
spotbugs.addAuxClasspathEntry(Paths.get(System.getProperty("user.home"), ".m2/repository/com/google/guava/guava/21.0/guava-21.0.jar"));
BugCollection detected = spotbugs.performAnalysis(Paths.get("target", "test-classes", "jp", "skypencil", "guava", "GuavaOptionalInterfaceReturn.class"));
assertThat(detected, containsExactly(1, MATCHER));
}
use of edu.umd.cs.findbugs.BugCollection in project guava-helper-for-java-8 by KengoTODA.
the class DependencyOnDeprecatedGuavaClassDetectorTest method detectMethodArgument.
@Test
public void detectMethodArgument() {
spotbugs.addAuxClasspathEntry(Paths.get(System.getProperty("user.home"), ".m2/repository/com/google/guava/guava/21.0/guava-21.0.jar"));
BugCollection detected = spotbugs.performAnalysis(Paths.get("target", "test-classes", "jp", "skypencil", "guava", "Java8OptionalMethodArgument.class"));
assertThat(detected, containsExactly(0, MATCHER));
}
Aggregations