MartinKanters commented on a change in pull request #386:
URL: https://github.com/apache/maven/pull/386#discussion_r514502330
##########
File path:
maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java
##########
@@ -236,9 +236,9 @@ public void testReadInvalidPom()
{
projectBuilder.build( pomFile, configuration );
}
- catch ( InvalidArtifactRTException iarte )
+ catch ( Exception ex )
{
- assertThat( iarte.getMessage(), containsString( "The groupId
cannot be empty." ) );
+ assertThat( ex.getMessage(), containsString( "expected START_TAG
or END_TAG not TEXT" ) );
Review comment:
The extra space at the start can be removed I think.
##########
File path:
maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java
##########
@@ -249,9 +249,9 @@ public void testReadInvalidPom()
catch ( ProjectBuildingException ex )
{
assertEquals( 1, ex.getResults().size() );
- MavenProject project = ex.getResults().get( 0 ).getProject();
- assertNotNull( project );
- assertNotSame( 0, ex.getResults().get( 0 ).getProblems().size() );
+ assertNotNull( ex.getResults().get( 0 ).getPomFile() );
Review comment:
It's not related to your merge request, but good practice anyway I
think.
To make sure we get in these catch block we should add a `fail("Expected an
exception to be thrown")` in the try-block after. I've had tests pass without
ever reaching the catch block..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]