public abstract class TapestryTest extends Object
doSetUp()
.
I recommend that you create your own abstract class for you application tests
that subclasses this. You can then create a TapestryTester
in that
class and store it in a static variable and also override
setUpForAllTestMethods()
for any other common setup.
For example:
public abstract class MyApplicationTest extends TapestryTest { private static final TapestryTester SHARED_TESTER = new TapestryTester( "pac.ka.ge", MyTestInfrastructureModule.class); public MyApplicationTest() { super(SHARED_TESTER); } @Override protected void setUpForAllTestClasses() throws Exception { MockitoAnnotations.initMocks(this); } }
Modifier and Type | Field and Description |
---|---|
protected TapestryTester |
tester |
Constructor and Description |
---|
TapestryTest(TapestryTester tester)
Creates a new instance using the given
TapestryTester ; you should
create this tester just once and share it across multiple tests,
for example by storing it in a static variable. |
Modifier and Type | Method and Description |
---|---|
protected void |
doSetUp()
Override this instead of
setUp() |
void |
setUp()
Override
doSetUp() instead. |
protected void |
setUpForAllTestClasses()
Deprecated.
Rename your method so that it overrides
setUpForAllTestMethods() |
protected void |
setUpForAllTestMethods()
See class javadoc for example:
TapestryTest |
void |
tearDown() |
protected final TapestryTester tester
public TapestryTest(TapestryTester tester)
TapestryTester
; you should
create this tester just once and share it across multiple tests,
for example by storing it in a static variable.tester
- the tester to use (not null)@Deprecated protected void setUpForAllTestClasses() throws Exception
setUpForAllTestMethods()
Exception
protected void setUpForAllTestMethods() throws Exception
TapestryTest
Exception
protected void doSetUp() throws Exception
setUp()
Exception
Copyright © 2009-2012. All Rights Reserved.