You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by se...@apache.org on 2013/05/17 19:56:51 UTC
svn commit: r1483929 -
/creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
Author: sebb
Date: Fri May 17 17:56:51 2013
New Revision: 1483929
URL: http://svn.apache.org/r1483929
Log:
Merge both parts of it2 test case
Modified:
creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
Modified: creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java?rev=1483929&r1=1483928&r2=1483929&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java (original)
+++ creadur/rat/trunk/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java Fri May 17 17:56:51 2013
@@ -358,7 +358,10 @@ public class RatCheckMojoTest extends Ab
}
catch ( RatCheckException e )
{
- // Ok
+ final String msg = e.getMessage();
+ final String REPORTFILE = "rat.txt"; // Default: defaultValue = "${project.build.directory}/rat.txt"
+ assertTrue("report filename was not contained in '" + msg +"'", msg.contains(REPORTFILE));
+ assertFalse("no null allowed in '" + msg +"'", (msg.toUpperCase().indexOf("NULL") > -1));
}
checkResult( ratTxtFile, 1, 1 );
}
@@ -393,22 +396,4 @@ public class RatCheckMojoTest extends Ab
assertTrue(firstLineModified.indexOf("~~") != -1);
}
- /**
- * Verify it2 exception message contains report file name (RAT-127).
- */
- public void testIt4() throws Exception {
- final RatCheckMojo mojo = newRatCheckMojo( "it2" );
- try
- {
- mojo.execute();
- fail( "Expected RatCheckException" );
- }
- catch ( RatCheckException e )
- {
- final String msg = e.getMessage();
- final String REPORTFILE = "rat.txt"; // Default: defaultValue = "${project.build.directory}/rat.txt"
- assertTrue("report filename was not contained in '" + msg +"'", (msg.indexOf(REPORTFILE) > -1));
- assertFalse("no null allowed in '" + msg +"'", (msg.toUpperCase().indexOf("NULL") > -1));
- }
- }
}