org.apache.maven.plugin.ejb
Class EjbMojoTest

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.plugin.ejb.EjbMojoTest
All Implemented Interfaces:
junit.framework.Test

public class EjbMojoTest
extends org.apache.maven.plugin.testing.AbstractMojoTestCase

EJB plugin Test Case


Field Summary
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
EjbMojoTest()
           
 
Method Summary
protected  void assertClientJarContent(org.apache.maven.project.MavenProject project, String[] expectedFiles, String[] unexpectedFiles)
           
protected  void assertJarContent(org.apache.maven.project.MavenProject project, String[] expectedFiles, String[] unexpectedFiles)
           
protected  void assertJarCreation(org.apache.maven.project.MavenProject project, boolean ejbJarCreated, boolean ejbClientJarCreated)
           
protected  void assertJarCreation(org.apache.maven.project.MavenProject project, boolean ejbJarCreated, boolean ejbClientJarCreated, String classifier)
           
protected  MavenProjectResourcesStub createTestProject(String testName)
           
protected  EjbMojo lookupMojo()
           
protected  EjbMojo lookupMojoWithDefaultSettings(org.apache.maven.project.MavenProject project)
           
protected  EjbMojo lookupMojoWithSettings(org.apache.maven.project.MavenProject project, LinkedList clientIncludes, LinkedList clientExcludes, LinkedList excludes)
           
 void setUp()
           
protected  void setupDefaultProject(MavenProjectResourcesStub project)
           
 void tearDown()
           
 void testClassifiedJarWithClientJar()
          Classified jar creation test with client jar.
 void testClassifiedJarWithoutClientJar()
          Classified jar creation test.
 void testClientJarDefaultInclusionsExclusions()
          Client jar default inclusion and exclusion test.
 void testClientJarExclusions()
          Client jar exclusions test.
 void testClientJarExclusionsWithEmptyPackage()
          Client jar exclusions test that leaves an empty package.
 void testClientJarInclusions()
          Client jar inclusion test.
 void testClientJarInclusionsWithSubPackage()
          Client jar inclusion test with a sub-package.
 void testDefaultInclusionsExclusions()
          Default ejb jar inclusion and exclusion test.
 void testDefaultWithClientJar()
          Basic jar creation test with client jar.
 void testDefaultWithoutClientJar()
          Basic jar creation test.
 void testEjbCompliance_3_0_WithoutDescriptor()
          Tests if the jar is created under EJB version 3.0 without deployment descriptor present.
 void testEjbComplianceVersionThreeWithDescriptor()
          Tests if the jar is created under EJB version 3.0 with deployment descriptor present.
 void testEjbComplianceVersionTwoDotOneWithoutDescriptor()
          Tests if the mojo throws an exception when the EJB version is < 3.0 and no deployment descriptor is present.
 void testMainJarExclusions()
          Main jar exclusions test.
 void testTestEnvironment()
          check test environment
 
Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, 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
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EjbMojoTest

public EjbMojoTest()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class org.apache.maven.plugin.testing.AbstractMojoTestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class PlexusTestCase
Throws:
Exception

testTestEnvironment

public void testTestEnvironment()
                         throws Exception
check test environment

Throws:
Exception - if any exception occurs

testDefaultWithoutClientJar

public void testDefaultWithoutClientJar()
                                 throws Exception
Basic jar creation test.

Throws:
Exception - if any exception occurs

testClassifiedJarWithoutClientJar

public void testClassifiedJarWithoutClientJar()
                                       throws Exception
Classified jar creation test.

Throws:
Exception - if any exception occurs

testDefaultWithClientJar

public void testDefaultWithClientJar()
                              throws Exception
Basic jar creation test with client jar.

Throws:
Exception - if any exception occurs

testClassifiedJarWithClientJar

public void testClassifiedJarWithClientJar()
                                    throws Exception
Classified jar creation test with client jar.

Throws:
Exception - if any exception occurs

testDefaultInclusionsExclusions

public void testDefaultInclusionsExclusions()
                                     throws Exception
Default ejb jar inclusion and exclusion test.

Throws:
Exception - if any exception occurs

testClientJarDefaultInclusionsExclusions

public void testClientJarDefaultInclusionsExclusions()
                                              throws Exception
Client jar default inclusion and exclusion test.

Throws:
Exception - if any exception occurs

testClientJarInclusions

public void testClientJarInclusions()
                             throws Exception
Client jar inclusion test.

Throws:
Exception - if any exception occurs

testClientJarExclusions

public void testClientJarExclusions()
                             throws Exception
Client jar exclusions test.

Throws:
Exception - if any exception occurs

testMainJarExclusions

public void testMainJarExclusions()
                           throws Exception
Main jar exclusions test.

Throws:
Exception - if any exception occurs

testClientJarInclusionsWithSubPackage

public void testClientJarInclusionsWithSubPackage()
                                           throws Exception
Client jar inclusion test with a sub-package.

Throws:
Exception - if any exception occurs

testClientJarExclusionsWithEmptyPackage

public void testClientJarExclusionsWithEmptyPackage()
                                             throws Exception
Client jar exclusions test that leaves an empty package.

Throws:
Exception - if any exception occurs

testEjbComplianceVersionTwoDotOneWithoutDescriptor

public void testEjbComplianceVersionTwoDotOneWithoutDescriptor()
                                                        throws Exception
Tests if the mojo throws an exception when the EJB version is < 3.0 and no deployment descriptor is present. The case with deployment descriptor present is covered by previous tests.

Throws:
Exception - if any exception occurs

testEjbComplianceVersionThreeWithDescriptor

public void testEjbComplianceVersionThreeWithDescriptor()
                                                 throws Exception
Tests if the jar is created under EJB version 3.0 with deployment descriptor present.

Throws:
Exception - if any exception occurs

testEjbCompliance_3_0_WithoutDescriptor

public void testEjbCompliance_3_0_WithoutDescriptor()
                                             throws Exception
Tests if the jar is created under EJB version 3.0 without deployment descriptor present.

Throws:
Exception - if any exception occurs

lookupMojo

protected EjbMojo lookupMojo()
                      throws Exception
Throws:
Exception

createTestProject

protected MavenProjectResourcesStub createTestProject(String testName)
                                               throws Exception
Throws:
Exception

setupDefaultProject

protected void setupDefaultProject(MavenProjectResourcesStub project)
                            throws Exception
Throws:
Exception

lookupMojoWithSettings

protected EjbMojo lookupMojoWithSettings(org.apache.maven.project.MavenProject project,
                                         LinkedList clientIncludes,
                                         LinkedList clientExcludes,
                                         LinkedList excludes)
                                  throws Exception
Throws:
Exception

lookupMojoWithDefaultSettings

protected EjbMojo lookupMojoWithDefaultSettings(org.apache.maven.project.MavenProject project)
                                         throws Exception
Throws:
Exception

assertJarCreation

protected void assertJarCreation(org.apache.maven.project.MavenProject project,
                                 boolean ejbJarCreated,
                                 boolean ejbClientJarCreated,
                                 String classifier)

assertJarCreation

protected void assertJarCreation(org.apache.maven.project.MavenProject project,
                                 boolean ejbJarCreated,
                                 boolean ejbClientJarCreated)

assertJarContent

protected void assertJarContent(org.apache.maven.project.MavenProject project,
                                String[] expectedFiles,
                                String[] unexpectedFiles)
                         throws IOException
Throws:
IOException

assertClientJarContent

protected void assertClientJarContent(org.apache.maven.project.MavenProject project,
                                      String[] expectedFiles,
                                      String[] unexpectedFiles)
                               throws IOException
Throws:
IOException


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.