Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TestResult |
|
| 1.1;1,1 |
1 | 0 | package pt.digitalis.dif.sanitycheck; |
2 | ||
3 | import pt.digitalis.dif.sanitycheck.manager.TestMethodDefinition; | |
4 | ||
5 | /** | |
6 | * @author Galaio da Silva <a href="mailto:jgalaio@digitalis.pt">jgalaio@digitalis.pt</a><br/> | |
7 | * @created 1 de Jul de 2011 | |
8 | */ | |
9 | public class TestResult { | |
10 | ||
11 | /** the test error message */ | |
12 | private String errorMessage; | |
13 | ||
14 | /** Sanity Result Type */ | |
15 | ExecutionResult executionResult; | |
16 | ||
17 | /** Sanity Check Unit name */ | |
18 | private String name; | |
19 | ||
20 | /** The test success message */ | |
21 | private String successMessage; | |
22 | ||
23 | /** | |
24 | * @param executionResult | |
25 | */ | |
26 | public TestResult(ExecutionResult executionResult) | |
27 | { | |
28 | 0 | this(null, executionResult); |
29 | 0 | } |
30 | ||
31 | /** | |
32 | * @param testMethod | |
33 | * @param executionResult | |
34 | */ | |
35 | public TestResult(TestMethodDefinition testMethod, ExecutionResult executionResult) | |
36 | { | |
37 | 0 | super(); |
38 | 0 | this.executionResult = executionResult; |
39 | ||
40 | 0 | if (testMethod != null) |
41 | 0 | setName(testMethod.getName()); |
42 | 0 | } |
43 | ||
44 | /** | |
45 | * Inspector for the 'errorMessage' attribute. | |
46 | * | |
47 | * @return the errorMessage value | |
48 | */ | |
49 | public String getErrorMessage() | |
50 | { | |
51 | 0 | return errorMessage; |
52 | } | |
53 | ||
54 | /** | |
55 | * Inspector for the 'executionResult' attribute. | |
56 | * | |
57 | * @return the executionResult value | |
58 | */ | |
59 | public ExecutionResult getExecutionResult() | |
60 | { | |
61 | 0 | return executionResult; |
62 | } | |
63 | ||
64 | /** | |
65 | * Inspector for the 'name' attribute. | |
66 | * | |
67 | * @return the name value | |
68 | */ | |
69 | public String getName() | |
70 | { | |
71 | 0 | return name; |
72 | } | |
73 | ||
74 | /** | |
75 | * Inspector for the 'sucessMessage' attribute. | |
76 | * | |
77 | * @return the sucessMessage value | |
78 | */ | |
79 | public String getSuccessMessage() | |
80 | { | |
81 | 0 | return successMessage; |
82 | } | |
83 | ||
84 | /** | |
85 | * Modifier for the 'errorMessage' attribute. | |
86 | * | |
87 | * @param errorMessage | |
88 | * the new errorMessage value to set | |
89 | */ | |
90 | public void setErrorMessage(String errorMessage) | |
91 | { | |
92 | 0 | this.errorMessage = errorMessage; |
93 | 0 | } |
94 | ||
95 | /** | |
96 | * Modifier for the 'executionResult' attribute. | |
97 | * | |
98 | * @param executionResult | |
99 | * the new executionResult value to set | |
100 | */ | |
101 | public void setExecutionResult(ExecutionResult executionResult) | |
102 | { | |
103 | 0 | this.executionResult = executionResult; |
104 | 0 | } |
105 | ||
106 | /** | |
107 | * Modifier for the 'name' attribute. | |
108 | * | |
109 | * @param name | |
110 | * the new name value to set | |
111 | */ | |
112 | public void setName(String name) | |
113 | { | |
114 | 0 | this.name = name; |
115 | 0 | } |
116 | ||
117 | /** | |
118 | * Modifier for the 'sucessMessage' attribute. | |
119 | * | |
120 | * @param sucessMessage | |
121 | * the new sucessMessage value to set | |
122 | */ | |
123 | public void setSuccessMessage(String sucessMessage) | |
124 | { | |
125 | 0 | this.successMessage = sucessMessage; |
126 | 0 | } |
127 | ||
128 | } |