Package org.apache.cactus.maven2.mojos

Examples of org.apache.cactus.maven2.mojos.ServletRedirector


     * Set-up method to instantiate the mojo.
     */
    public void setUp() throws Exception
    {
        super.setUp();
        this.cactifyEarMojo = new CactifyEarMojo();
    }
View Full Code Here


     */
    public void testCactifyEarWithNoParametersSpecified() throws Exception
    {
        File testPom = new File(getBasedir(), "target/test-classes/unit/ear/basic-"
                + "cactify-noparameters/plugin-config.xml");
        CactifyEarMojo mojo = (CactifyEarMojo) lookupMojo("cactifyear", testPom);
        assertNotNull(mojo);
        try
        {
          mojo.execute();
          fail("Exception should have been raised!");
        }
        catch (MojoExecutionException mex)
        {
          assertEquals("You need to specify [srcFile] attribute for cactification!", mex.getMessage());
View Full Code Here

     * Set-up method to instantiate the mojo.
     */
    public void setUp() throws Exception
    {
        super.setUp();
        this.cactifyWarMojo = new CactifyWarMojo();
    }
View Full Code Here

    public void testNoParametersSupplied()
    throws Exception
    {
        File testPom = new File(getBasedir(), "target/test-classes/unit/basic-"
               + "cactify-noparameters/plugin-config.xml");
        CactifyWarMojo mojo = (CactifyWarMojo) lookupMojo("cactifywar",
                testPom);
        assertNotNull(mojo);
        try
        {
            mojo.execute();
        }
        catch(MojoExecutionException mojex)
        {
            assertEquals("You need to specify either the [srcFile] " +
                    "or the [version] attribute", mojex.getMessage());
View Full Code Here

     */
    public void testIfVersionIsSetAndWrongMergeXmlParameterPassed() throws Exception
    {
        File testPom = new File(getBasedir(), "target/test-classes/unit/"
                + "cactify-test-wrong-mergexml-specified/plugin-config.xml");
         CactifyWarMojo mojo = (CactifyWarMojo) lookupMojo("cactifywar",
                  testPom);
         assertNotNull(mojo);
         try
         {
             mojo.execute();
         }
         catch(MojoExecutionException mx)
         {
             assertEquals("Could not merge deployment descriptors", mx.getMessage())
         }
View Full Code Here

     */
    public void testWrongSrcParameterPassed() throws Exception
    {
        File testPom = new File(getBasedir(), "target/test-classes/unit/"
                + "cactify-test-wrong-src-parameter-passed/plugin-config.xml");
         CactifyWarMojo mojo = (CactifyWarMojo) lookupMojo("cactifywar",
                  testPom);
         assertNotNull(mojo);
         try
         {
             mojo.execute();
         }
         catch(MojoExecutionException mx)
         {
             assertEquals("Failed to get the original web.xml", mx.getMessage())
         }
View Full Code Here

TOP

Related Classes of org.apache.cactus.maven2.mojos.ServletRedirector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.