|
1 |
| package com.agical.rdoc.core.model.test.impl; |
|
2 |
| |
|
3 |
| import com.agical.rdoc.core.model.test.AbstractCompositeTestNode; |
|
4 |
| import com.agical.rdoc.core.model.test.Test; |
|
5 |
| import com.agical.rdoc.core.model.test.TestCase; |
|
6 |
| import com.agical.rdoc.core.model.test.TestNodeVisitor; |
|
7 |
| |
|
8 |
| |
|
9 |
| public class TestCaseImpl extends AbstractCompositeTestNode implements TestCase { |
|
10 |
| private static final long serialVersionUID = -5278945812002904995L; |
|
11 |
| private final Class testClass; |
|
12 |
| |
|
13 |
100
| public TestCaseImpl(Class testClass) {
|
|
14 |
100
| this.testClass = testClass;
|
|
15 |
| } |
|
16 |
| |
|
17 |
11
| protected void visitThis(TestNodeVisitor visitor) {
|
|
18 |
11
| visitor.visit( this );
|
|
19 |
| } |
|
20 |
| |
|
21 |
252
| public void addTest(Test test) {
|
|
22 |
252
| addChild(test);
|
|
23 |
| } |
|
24 |
| |
|
25 |
3
| public boolean equals(Object obj) {
|
|
26 |
3
| return ((TestCase)obj).getTestClass().equals(testClass);
|
|
27 |
| } |
|
28 |
| |
|
29 |
13
| public Class getTestClass() {
|
|
30 |
13
| return testClass;
|
|
31 |
| } |
|
32 |
| |
|
33 |
0
| public String toString() {
|
|
34 |
0
| return "TestCaseImpl for class:" + testClass.getName();
|
|
35 |
| } |
|
36 |
| } |