org.mule.tck
Class AbstractMuleTestCase

java.lang.Object
  extended byTestCase
      extended byorg.mule.tck.AbstractMuleTestCase
Direct Known Subclasses:
AbstractConnectorTestCase, AbstractContainerContextTestCase, AbstractEntryPointDiscoveryTestCase, AbstractMessageAdapterTestCase, AbstractMessageReceiverTestCase, AbstractPoolTestCase, AbstractProviderFunctionalTestCase, AbstractProxyPoolFactoryTestCase, AbstractTransformerTestCase, AbstractUMOManagerTestCase, FunctionalTestCase

public abstract class AbstractMuleTestCase
extends TestCase

AbstractMuleTestCase is a base class for Mule testcases. This implementation provides services to test code for creating mock and test objects.

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractMuleTestCase.TestInfo
           
 
Field Summary
protected  Log logger
           
protected  String prereqs
           
 
Constructor Summary
AbstractMuleTestCase()
           
 
Method Summary
protected  void addTest()
           
protected  String checkPreReqs()
          Use this method to do any validation such as check for an installation of a required server If the current environment does not have the preReqs of the test return false and the test will be skipped.
protected  void disposeManager()
           
protected  void doSetUp()
           
protected  void doTearDown()
           
protected  void finalize()
           
static UMOManager getManager(boolean disableAdminAgent)
           
 String getName()
           
static UMOComponent getTestComponent(MuleDescriptor descriptor)
           
static TestConnector getTestConnector()
           
static MuleDescriptor getTestDescriptor(String name, String implementation)
           
static UMOEndpoint getTestEndpoint(String name, String type)
           
static UMOEvent getTestEvent(Object data)
           
static UMOEvent getTestEvent(Object data, MuleDescriptor descriptor)
           
static UMOEvent getTestEvent(Object data, MuleDescriptor descriptor, UMOImmutableEndpoint endpoint)
           
static UMOEvent getTestEvent(Object data, UMOImmutableEndpoint endpoint)
           
static UMOEventContext getTestEventContext(Object data)
           
protected  AbstractMuleTestCase.TestInfo getTestInfo()
           
static UMOManager getTestManager()
           
static UMOSession getTestSession(UMOComponent component)
           
static UMOTransformer getTestTransformer()
           
 boolean isOffline(String method)
           
 boolean isPrereqsMet(String method)
           
protected  void setDisposeManagerPerSuite(boolean val)
           
protected  void setUp()
           
protected  void suitePostSetUp()
           
protected  void suitePostTearDown()
           
protected  void suitePreSetUp()
           
protected  void suitePreTearDown()
           
protected  void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger

prereqs

protected String prereqs
Constructor Detail

AbstractMuleTestCase

public AbstractMuleTestCase()
Method Detail

addTest

protected void addTest()

setDisposeManagerPerSuite

protected void setDisposeManagerPerSuite(boolean val)

getTestInfo

protected AbstractMuleTestCase.TestInfo getTestInfo()

getName

public String getName()

checkPreReqs

protected String checkPreReqs()
Use this method to do any validation such as check for an installation of a required server If the current environment does not have the preReqs of the test return false and the test will be skipped.


isOffline

public boolean isOffline(String method)

isPrereqsMet

public boolean isPrereqsMet(String method)

setUp

protected final void setUp()
                    throws Exception
Throws:
Exception

suitePreSetUp

protected void suitePreSetUp()
                      throws Exception
Throws:
Exception

suitePostSetUp

protected void suitePostSetUp()
                       throws Exception
Throws:
Exception

suitePreTearDown

protected void suitePreTearDown()
                         throws Exception
Throws:
Exception

suitePostTearDown

protected void suitePostTearDown()
                          throws Exception
Throws:
Exception

tearDown

protected final void tearDown()
                       throws Exception
Throws:
Exception

disposeManager

protected void disposeManager()

doSetUp

protected void doSetUp()
                throws Exception
Throws:
Exception

doTearDown

protected void doTearDown()
                   throws Exception
Throws:
Exception

getManager

public static UMOManager getManager(boolean disableAdminAgent)
                             throws Exception
Throws:
Exception

getTestEndpoint

public static UMOEndpoint getTestEndpoint(String name,
                                          String type)
                                   throws Exception
Throws:
Exception

getTestEvent

public static UMOEvent getTestEvent(Object data)
                             throws Exception
Throws:
Exception

getTestEventContext

public static UMOEventContext getTestEventContext(Object data)
                                           throws Exception
Throws:
Exception

getTestTransformer

public static UMOTransformer getTestTransformer()

getTestEvent

public static UMOEvent getTestEvent(Object data,
                                    MuleDescriptor descriptor)
                             throws Exception
Throws:
Exception

getTestEvent

public static UMOEvent getTestEvent(Object data,
                                    UMOImmutableEndpoint endpoint)
                             throws Exception
Throws:
Exception

getTestEvent

public static UMOEvent getTestEvent(Object data,
                                    MuleDescriptor descriptor,
                                    UMOImmutableEndpoint endpoint)
                             throws UMOException
Throws:
UMOException

getTestSession

public static UMOSession getTestSession(UMOComponent component)

getTestConnector

public static TestConnector getTestConnector()

getTestComponent

public static UMOComponent getTestComponent(MuleDescriptor descriptor)

getTestDescriptor

public static MuleDescriptor getTestDescriptor(String name,
                                               String implementation)
                                        throws Exception
Throws:
Exception

getTestManager

public static UMOManager getTestManager()
                                 throws UMOException
Throws:
UMOException

finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.