Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-32298] Update of testcase due to new parser regexp.
  • Loading branch information
uhafner committed May 24, 2016
1 parent 5d40b25 commit cadfb2a071bf1045b9c74af45b9ea1cf57958e74
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java
@@ -79,18 +79,18 @@ public void testOracleInvalidsParser() throws IOException {
public void testTwoParsers() throws IOException {
List<AbstractWarningsParser> parsers = new ArrayList<AbstractWarningsParser>();
parsers.add(new InvalidsParser());
parsers.add(new JavaDocParser());
parsers.add(new PhpParser());
ParserRegistry parserRegistry = createRegistryUnderTest(FILE_NAME, parsers);

Collection<FileAnnotation> annotations = parserRegistry.parse(DUMMY_FILE);
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 10, annotations.size());
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 6, annotations.size());

ParserResult result = new ParserResult();
result.addAnnotations(annotations);
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 10, result.getNumberOfAnnotations());
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 6, result.getNumberOfAnnotations());

result.addAnnotations(annotations);
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 10, result.getNumberOfAnnotations());
assertEquals(WRONG_NUMBER_OF_ANNOTATIONS_PARSED, 6, result.getNumberOfAnnotations());
}

/**

0 comments on commit cadfb2a

Please sign in to comment.