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: * but without redefining a @Configuration
09: *
10: * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
11: */
12: public class SimpleOverriddingChild extends Parent {
13: /**
14: * @testng.before-class
15: */
16: public void childBeforeTestClass() {
17: ConfigurationMethodOrderingTest.LOG.add("childBeforeTestClass");
18: }
19:
20: public void inheritBeforeTestClass() {
21: ConfigurationMethodOrderingTest.LOG
22: .add("childInheritBeforeTestClass");
23: }
24:
25: /**
26: * @testng.before-method
27: */
28: public void childBeforeTestMethod() {
29: ConfigurationMethodOrderingTest.LOG
30: .add("childBeforeTestMethod");
31: }
32:
33: public void inheritBeforeTestMethod() {
34: ConfigurationMethodOrderingTest.LOG
35: .add("childInheritBeforeTestMethod");
36: }
37:
38: /**
39: * @testng.test
40: */
41: public void childTestMethod() {
42: ConfigurationMethodOrderingTest.LOG.add("childTestMethod");
43: }
44:
45: /**
46: * @testng.after-method
47: */
48: public void childAfterTestMethod() {
49: ConfigurationMethodOrderingTest.LOG.add("childAfterTestMethod");
50: }
51:
52: public void inheritAfterTestMethod() {
53: ConfigurationMethodOrderingTest.LOG
54: .add("childInheritAfterTestMethod");
55: }
56:
57: /**
58: * @testng.after-class
59: */
60: public void childAfterTestClass() {
61: ConfigurationMethodOrderingTest.LOG.add("childAfterTestClass");
62: }
63:
64: public void inheritAfterTestClass() {
65: ConfigurationMethodOrderingTest.LOG
66: .add("childInheritAfterTestClass");
67: }
68: }
|