@Test public void testToString_oneInvalidClassFileInArtifact() { InvalidClassFileProblem problemOneClass = new InvalidClassFileProblem( ImmutableList.of(nodeA, nodeB, nodeC), ImmutableList.of("foo.bar.Class")); assertEquals( "foo:c:jar:1.0.0 contains an invalid class file foo.bar.Class. " + "Dependency path: " + "foo:a:jar:1.0.0 (compile) > foo:b:jar:1.0.0 (provided) > foo:c:jar:1.0.0 (runtime)", problemOneClass.toString()); }
@Override public String toString() { int classFileCount = classFileNames.size(); String classFileDescription; if (classFileCount == 1) { classFileDescription = "an invalid class file " + classFileNames.get(0) + "."; } else { classFileDescription = classFileCount + " invalid class files (example: " + classFileNames.get(0) + ")."; } return artifact + " contains " + classFileDescription + " Dependency path: " + getPath(); }
InvalidClassFileProblem extends ArtifactProblem { @Override public String toString() { int classFileCount = classFileNames.size(); String classFileDescription; if (classFileCount == 1) { classFileDescription = "an invalid class file " + classFileNames.get(0) + "."; } else { classFileDescription = classFileCount + " invalid class files (example: " + classFileNames.get(0) + ")."; } return artifact + " contains " + classFileDescription + " Dependency path: " + getPath(); } }
InvalidClassFileProblem extends ArtifactProblem { @Override public String toString() { int classFileCount = classFileNames.size(); String classFileDescription; if (classFileCount == 1) { classFileDescription = "an invalid class file " + classFileNames.get(0) + "."; } else { classFileDescription = classFileCount + " invalid class files (example: " + classFileNames.get(0) + ")."; } return artifact + " contains " + classFileDescription + " Dependency path: " + getPath(); } InvalidClassFileProblem(List<DependencyNode> dependencyPath, List<String> classFileNames); }
InvalidClassFileProblem extends ArtifactProblem { @Override public String toString() { int classFileCount = classFileNames.size(); String classFileDescription; if (classFileCount == 1) { classFileDescription = "an invalid class file " + classFileNames.get(0) + "."; } else { classFileDescription = classFileCount + " invalid class files (example: " + classFileNames.get(0) + ")."; } return artifact + " contains " + classFileDescription + " Dependency path: " + getPath(); } InvalidClassFileProblem(List<DependencyNode> dependencyPath, List<String> classFileNames); @Override String toString(); }
InvalidClassFileProblem extends ArtifactProblem { @Override public String toString() { int classFileCount = classFileNames.size(); String classFileDescription; if (classFileCount == 1) { classFileDescription = "an invalid class file " + classFileNames.get(0) + "."; } else { classFileDescription = classFileCount + " invalid class files (example: " + classFileNames.get(0) + ")."; } return artifact + " contains " + classFileDescription + " Dependency path: " + getPath(); } InvalidClassFileProblem(List<DependencyNode> dependencyPath, List<String> classFileNames); @Override String toString();  }