@Test public void testGenerateMessageForFixedError() { String message = LinkageMonitor.messageForFixedErrors( ImmutableSet.of(classNotFoundProblem, methodNotFoundProblemFromA)); assertEquals( "The following problems in the baseline no longer appear in the snapshot:\n" + " Class java.lang.Integer is not found\n" + " (foo:b:1.0.0) io.grpc.protobuf.ProtoUtils's method " + "marshaller(com.google.protobuf.Message) is not found\n", message); }
@VisibleForTesting static String messageForFixedErrors(Set<LinkageProblem> fixedProblems) { int problemSize = fixedProblems.size(); StringBuilder message = new StringBuilder( "The following problem" + (problemSize > 1 ? "s" : "") + " in the baseline no longer appear in the snapshot:\n"); for (LinkageProblem problem : fixedProblems) { message.append(" " + problem.formatSymbolProblem() + "\n"); } return message.toString(); }
LinkageMonitor { @VisibleForTesting static String messageForFixedErrors(Set<LinkageProblem> fixedProblems) { int problemSize = fixedProblems.size(); StringBuilder message = new StringBuilder( "The following problem" + (problemSize > 1 ? "s" : "") + " in the baseline no longer appear in the snapshot:\n"); for (LinkageProblem problem : fixedProblems) { message.append(" " + problem.formatSymbolProblem() + "\n"); } return message.toString(); } }
LinkageMonitor { @VisibleForTesting static String messageForFixedErrors(Set<LinkageProblem> fixedProblems) { int problemSize = fixedProblems.size(); StringBuilder message = new StringBuilder( "The following problem" + (problemSize > 1 ? "s" : "") + " in the baseline no longer appear in the snapshot:\n"); for (LinkageProblem problem : fixedProblems) { message.append(" " + problem.formatSymbolProblem() + "\n"); } return message.toString(); }  }
LinkageMonitor { @VisibleForTesting static String messageForFixedErrors(Set<LinkageProblem> fixedProblems) { int problemSize = fixedProblems.size(); StringBuilder message = new StringBuilder( "The following problem" + (problemSize > 1 ? "s" : "") + " in the baseline no longer appear in the snapshot:\n"); for (LinkageProblem problem : fixedProblems) { message.append(" " + problem.formatSymbolProblem() + "\n"); } return message.toString(); }  static void main(String[] arguments); }
LinkageMonitor { @VisibleForTesting static String messageForFixedErrors(Set<LinkageProblem> fixedProblems) { int problemSize = fixedProblems.size(); StringBuilder message = new StringBuilder( "The following problem" + (problemSize > 1 ? "s" : "") + " in the baseline no longer appear in the snapshot:\n"); for (LinkageProblem problem : fixedProblems) { message.append(" " + problem.formatSymbolProblem() + "\n"); } return message.toString(); }  static void main(String[] arguments);  }