org.apache.maven.plugins.enforcer.utils
Class TestEnforcerRuleUtils

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.plugin.testing.AbstractMojoTestCase
                  extended by org.apache.maven.plugins.enforcer.utils.TestEnforcerRuleUtils
All Implemented Interfaces:
Test

public class TestEnforcerRuleUtils
extends AbstractMojoTestCase

The Class TestEnforcerRuleUtils.

Author:
Brian Fox

Field Summary
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
TestEnforcerRuleUtils()
           
 
Method Summary
static void execute(EnforcerRule rule, EnforcerRuleHelper helper, boolean shouldFail)
          Simpler wrapper to execute and deal with the expected result.
 void testCheckIfModelMatches()
          Test check if model matches.
 void testGetModelsRecursivelyBottom()
          Test get models recursively bottom.
 void testGetModelsRecursivelyParentExpression()
           
 void testGetModelsRecursivelyParentRelativePath()
           
 void testGetModelsRecursivelyParentRelativePathDirectory()
           
 void testGetModelsRecursivelyTop()
          Test get models recursively top.
 
Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setUp, setVariableValueToObject
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestEnforcerRuleUtils

public TestEnforcerRuleUtils()
Method Detail

testCheckIfModelMatches

public void testCheckIfModelMatches()
Test check if model matches.


testGetModelsRecursivelyBottom

public void testGetModelsRecursivelyBottom()
                                    throws ArtifactResolutionException,
                                           ArtifactNotFoundException,
                                           IOException,
                                           XmlPullParserException
Test get models recursively bottom.

Throws:
ArtifactResolutionException - the artifact resolution exception
ArtifactNotFoundException - the artifact not found exception
IOException - Signals that an I/O exception has occurred.
XmlPullParserException - the xml pull parser exception

testGetModelsRecursivelyTop

public void testGetModelsRecursivelyTop()
                                 throws ArtifactResolutionException,
                                        ArtifactNotFoundException,
                                        IOException,
                                        XmlPullParserException
Test get models recursively top.

Throws:
ArtifactResolutionException - the artifact resolution exception
ArtifactNotFoundException - the artifact not found exception
IOException - Signals that an I/O exception has occurred.
XmlPullParserException - the xml pull parser exception

testGetModelsRecursivelyParentExpression

public void testGetModelsRecursivelyParentExpression()
                                              throws ArtifactResolutionException,
                                                     ArtifactNotFoundException,
                                                     IOException,
                                                     XmlPullParserException
Throws:
ArtifactResolutionException
ArtifactNotFoundException
IOException
XmlPullParserException

testGetModelsRecursivelyParentRelativePath

public void testGetModelsRecursivelyParentRelativePath()
                                                throws ArtifactResolutionException,
                                                       ArtifactNotFoundException,
                                                       IOException,
                                                       XmlPullParserException
Throws:
ArtifactResolutionException
ArtifactNotFoundException
IOException
XmlPullParserException

testGetModelsRecursivelyParentRelativePathDirectory

public void testGetModelsRecursivelyParentRelativePathDirectory()
                                                         throws ArtifactResolutionException,
                                                                ArtifactNotFoundException,
                                                                IOException,
                                                                XmlPullParserException
Throws:
ArtifactResolutionException
ArtifactNotFoundException
IOException
XmlPullParserException

execute

public static void execute(EnforcerRule rule,
                           EnforcerRuleHelper helper,
                           boolean shouldFail)
Simpler wrapper to execute and deal with the expected result.

Parameters:
rule - the rule
helper - the helper
shouldFail - the should fail


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.