com.consol.citrus.junit
Class AbstractJUnit4CitrusTest

java.lang.Object
  extended by org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
      extended by com.consol.citrus.junit.AbstractJUnit4CitrusTest
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@TestExecutionListeners(value=TestSuiteAwareExecutionListener.class)
@ContextConfiguration(locations={"classpath:com/consol/citrus/spring/root-application-ctx.xml","classpath:citrus-context.xml","classpath:com/consol/citrus/functions/citrus-function-ctx.xml","classpath:com/consol/citrus/validation/citrus-validationmatcher-ctx.xml"})
public abstract class AbstractJUnit4CitrusTest
extends org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests

Abstract base test implementation for test cases that rather use JUnit testing framework. Class also provides test listener support and loads the root application context files for Citrus.

Author:
Christoph Deppisch

Field Summary
protected  org.slf4j.Logger log
          Logger
 
Fields inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
applicationContext, logger
 
Constructor Summary
AbstractJUnit4CitrusTest()
           
 
Method Summary
 void beforeTest()
          Run tasks before each test case.
protected  TestContext createTestContext()
          Creates a new test context.
protected  void executeTest()
          Execute the test case.
protected  TestContext prepareTestContext(TestContext testContext)
          Prepares the test context.
 
Methods inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
Logger

Constructor Detail

AbstractJUnit4CitrusTest

public AbstractJUnit4CitrusTest()
Method Detail

beforeTest

public void beforeTest()
Run tasks before each test case.


executeTest

protected void executeTest()
Execute the test case.


prepareTestContext

protected TestContext prepareTestContext(TestContext testContext)
Prepares the test context. Provides a hook for test context modifications before the test gets executed.

Parameters:
testContext - the test context.
Returns:
the (prepared) test context.

createTestContext

protected TestContext createTestContext()
Creates a new test context.

Returns:
the new citrus test context.
Throws:
Exception - on error.


Copyright © 2008-2013 ConSol* Consulting&Solutions GmbH. All Rights Reserved.