simplify as recommended by Benjamin

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@1004610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-10-05 10:58:51 +00:00
parent cf9c67bd42
commit 4f8959631d
1 changed files with 5 additions and 4 deletions

View File

@ -118,13 +118,14 @@ public class MyMojo
throw new MojoExecutionException( e.getMessage(), e );
}
// consistency check to see that we actually spoke to the test server, helpful for debugging if
// the test fails
try
{
String LS = System.getProperty( "line.separator" );
String content = FileUtils.fileRead( artifact.getFile() );
if ( !content.equals( "some content" + LS + LS ) )
String content = FileUtils.fileRead( artifact.getFile() ).trim();
if ( !content.equals( "some content" ) )
{
throw new MojoExecutionException( "Expected 'some content\n\n' but was '" + content + "'" );
throw new MojoExecutionException( "Expected 'some content' but was '" + content + "'" );
}
}
catch ( IOException e )