Created
June 4, 2012 23:05
-
-
Save sully6768/2871383 to your computer and use it in GitHub Desktop.
Aether Plugin Test - Mojo Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import org.apache.maven.plugin.testing.AbstractMojoTestCase; | |
public class MyAetherMojoTest extends AbstractMojoTestCase | |
{ | |
/** {@inheritDoc} */ | |
protected void setUp() | |
throws Exception | |
{ | |
// required | |
super.setUp(); | |
} | |
/** {@inheritDoc} */ | |
protected void tearDown() | |
throws Exception | |
{ | |
// required | |
super.tearDown(); | |
} | |
/** | |
* @throws Exception if any | |
*/ | |
public void testSomething() | |
throws Exception | |
{ | |
File pom = getTestFile( "src/test/resources/unit/test1/pom.xml" ); | |
assertNotNull( pom ); | |
assertTrue( pom.exists() ); | |
MyAetherMojo myMojo = (MyAetherMojo) lookupMojo( "resolve", pom ); | |
assertNotNull( myMojo ); | |
myMojo.execute(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment