1 package org.apache.fulcrum.yaafi;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import org.apache.fulcrum.yaafi.testcontainer.BaseUnitTest;
24
25 /**
26 * Test suite for ensuring that a dependent test component
27 * properly works even if it is declared before the service
28 * it depends on.
29 *
30 * @author <a href="mailto:siegfried.goeschl@it20one.at">Siegfried Goeschl</a>
31 */
32
33 public class DependentTestComponentTest extends BaseUnitTest
34 {
35 /**
36 * Constructor
37 * @param name the name of the test case
38 */
39 public DependentTestComponentTest( String name )
40 {
41 super(name);
42 }
43
44 /**
45 * DependentTestComponentImpl uses a TestComponent which. Make
46 * sure that the container resolves this cyclic dependency.
47 *
48 * @throws Exception
49 */
50 public void testDependentTestComponent() throws Exception
51 {
52 DependentTestComponent dependentTestComponent = (DependentTestComponent) this.lookup(
53 DependentTestComponent.ROLE
54 );
55
56 dependentTestComponent.test();
57 dependentTestComponent.toString();
58 }
59 }