01: package test.confordering.subpckg2;
02:
03: import test.confordering.ConfigurationMethodOrderingTest;
04: import test.confordering.subpckg1.Parent;
05:
06: /**
07: * This child overrides some of the @Configuration methods defined in Parent
08: * and also declares them as @Configuration
09: *
10: * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
11: */
12: public class OverriddingChild extends Parent {
13: /**
14: * @testng.before-class
15: */
16: public void childBeforeTestClass() {
17: ConfigurationMethodOrderingTest.LOG.add("childBeforeTestClass");
18: }
19:
20: /**
21: * @testng.before-class
22: */
23: public void inheritBeforeTestClass() {
24: ConfigurationMethodOrderingTest.LOG
25: .add("childInheritBeforeTestClass");
26: }
27:
28: /**
29: * @testng.before-method
30: */
31: public void childBeforeTestMethod() {
32: ConfigurationMethodOrderingTest.LOG
33: .add("childBeforeTestMethod");
34: }
35:
36: /**
37: * @testng.before-method
38: */
39: public void inheritBeforeTestMethod() {
40: ConfigurationMethodOrderingTest.LOG
41: .add("childInheritBeforeTestMethod");
42: }
43:
44: /**
45: * @testng.test
46: */
47: public void childTestMethod() {
48: ConfigurationMethodOrderingTest.LOG.add("childTestMethod");
49: }
50:
51: /**
52: * @testng.after-method
53: */
54: public void childAfterTestMethod() {
55: ConfigurationMethodOrderingTest.LOG.add("childAfterTestMethod");
56: }
57:
58: /**
59: * @testng.after-method
60: */
61: public void inheritAfterTestMethod() {
62: ConfigurationMethodOrderingTest.LOG
63: .add("childInheritAfterTestMethod");
64: }
65:
66: /**
67: * @testng.after-class
68: */
69: public void childAfterTestClass() {
70: ConfigurationMethodOrderingTest.LOG.add("childAfterTestClass");
71: }
72:
73: /**
74: * @testng.after-class
75: */
76: public void inheritAfterTestClass() {
77: ConfigurationMethodOrderingTest.LOG
78: .add("childInheritAfterTestClass");
79: }
80: }
|