|
1 |
| package com.agical.rdoc.core.model.test.impl; |
|
2 |
| |
|
3 |
| import java.io.Serializable; |
|
4 |
| |
|
5 |
| import com.agical.rdoc.core.DocumentationContext; |
|
6 |
| import com.agical.rdoc.core.model.test.Test; |
|
7 |
| import com.agical.rdoc.core.model.test.TestCase; |
|
8 |
| import com.agical.rdoc.core.model.test.TestNodeVisitor; |
|
9 |
| |
|
10 |
| public class TestImpl implements Test, Serializable { |
|
11 |
| private static final long serialVersionUID = -6352537823565984605L; |
|
12 |
| |
|
13 |
| private final TestCase testCase; |
|
14 |
| |
|
15 |
| private final String name; |
|
16 |
| |
|
17 |
| private final DocumentationContext documentationContext; |
|
18 |
| |
|
19 |
255
| public TestImpl(String name, TestCase testCase, DocumentationContext documentationContext) {
|
|
20 |
255
| this.name = name;
|
|
21 |
255
| this.testCase = testCase;
|
|
22 |
255
| this.documentationContext = documentationContext;
|
|
23 |
| } |
|
24 |
| |
|
25 |
11
| public void accept(TestNodeVisitor visitor) {
|
|
26 |
11
| visitor.visit(this);
|
|
27 |
| } |
|
28 |
| |
|
29 |
2
| public boolean equals(Object obj) {
|
|
30 |
2
| if (obj instanceof TestImpl) {
|
|
31 |
2
| return name.equals(((TestImpl)obj).name) && documentationContext.equals(((TestImpl)obj).documentationContext);
|
|
32 |
| } |
|
33 |
0
| return false;
|
|
34 |
| } |
|
35 |
| |
|
36 |
20
| public String getName() {
|
|
37 |
20
| return name;
|
|
38 |
| } |
|
39 |
| |
|
40 |
10
| public TestCase getTestCase() {
|
|
41 |
10
| return testCase;
|
|
42 |
| } |
|
43 |
| |
|
44 |
10
| public DocumentationContext getDocumentationContext() {
|
|
45 |
10
| return documentationContext;
|
|
46 |
| } |
|
47 |
| |
|
48 |
0
| public String toString() {
|
|
49 |
0
| return "Test name:" + name;
|
|
50 |
| } |
|
51 |
| } |