On 11 August 2014 06:46,  <[email protected]> wrote:
> Author: pottlinger
> Date: Mon Aug 11 05:46:11 2014
> New Revision: 1617205
>
> URL: http://svn.apache.org/r1617205
> Log:
> RAT-168 Tests don't check CLI usage
>
> -Ensuring that project itself and its list of remote ArtifactRepos are 
> notNull in integration tests.

AFAICT the test does not detect the error.

I tried reverting to the @Parameter annotation and the test still succeeded.

I think the problem is that the tests are run in a different environment.

There probably needs to be an IT instead to run the code directly.
And this commit should probably be reverted, as it does not add anything.

> 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=1617205&r1=1617204&r2=1617205&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
>  Mon Aug 11 05:46:11 2014
> @@ -177,6 +177,9 @@ public class RatCheckMojoTest extends Ab
>              }
>          };
>          setVariableValueToObject( mojo, "project", project );
> +        assertNotNull("RAT-168: Problem in test setup - you are missing a 
> project in your mojo.", project);
> +        assertNotNull("RAT-168: The mojo is missing its MavenProject, which 
> will result in an NPE during rat runs.", mojo.getProject());
> +        assertNotNull("RAT-168: No artifactRepos found, which will result in 
> an NPE during rat runs.", project.getRemoteArtifactRepositories());
>          if (mojo instanceof RatReportMojo)
>          {
>              setVariableValueToObject( mojo, "localRepository", 
> newArtifactRepository() );
>
>

Reply via email to