01: package test.dependent;
02:
03: public class SampleDependentConfigurationMethods {
04: private boolean m_create = false;
05: private boolean m_first = false;
06:
07: /**
08: * @testng.before-method dependsOnMethods="firstInvocation"
09: */
10: public void createInstance() {
11: assert m_first : "createInstance() was never called";
12: m_create = true;
13: }
14:
15: /**
16: * @testng.before-method
17: */
18: public void firstInvocation() {
19: m_first = true;
20: }
21:
22: /**
23: * @testng.test
24: */
25: public void verifyDependents() {
26: assert m_create : "createInstance() was never called";
27: assert m_first : "firstInvocation() was never called";
28: }
29: }
|