First commit in a looooooong time. I had connectivity problems.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / testpool / TestCase.java
1 /*
2  * Created on Jul 31, 2004
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */
7 package net.sourceforge.phpeclipse.phpunit.testpool;
8
9
10 /**
11  * @author Ali Echihabi
12  *
13  * To change the template for this generated type comment go to
14  * Window>Preferences>Java>Code Generation>Code and Comments
15  */
16 public class TestCase {
17
18         public static final String PASS = "PASS";
19         public static final String FAIL = "FAIL";
20         public static final String ERROR = "ERROR";
21
22
23         private TestSuite parentSuite;
24         
25         
26
27         /**
28          * @param testName
29          * @param testID
30          */
31         public TestCase(String testName, String testID) {
32                 
33                 this.testName = testName;
34                 this.testID = testID;
35         }
36
37
38         String testName;
39         String testID;
40         String verdict;
41
42         /**
43          * @return
44          */
45         public String getTestID() {
46                 return testID;
47         }
48
49         /**
50          * @return
51          */
52         public String getTestName() {
53                 return testName;
54         }
55
56         /**
57          * @return
58          */
59         public String getVerdict() {
60                 return verdict;
61         }
62
63         /**
64          * @param string
65          */
66         public void setTestID(String string) {
67                 testID = string;
68         }
69
70         /**
71          * @param string
72          */
73         public void setTestName(String string) {
74                 testName = string;
75         }
76
77         /**
78          * @param string
79          */
80         public void setVerdict(String string) {
81                 verdict = string;
82                 
83                 
84                 
85                 
86                         
87         }
88
89         /**
90          * @param suite
91          */
92         public void setParentSuite(TestSuite suite) {
93                 this.parentSuite = suite;
94                 
95         }
96
97         /**
98          * @return
99          */
100         public Object getParentSuite() {
101                 
102                 return parentSuite;
103         }
104
105         /**
106          * @return
107          */
108         public boolean isError() {
109                 
110                 return getVerdict().equals(TestCase.ERROR);
111         }
112
113         /**
114          * @return
115          */
116         public boolean isFailure() {
117                 
118                 return getVerdict().equals(TestCase.FAIL);
119                 
120         }
121
122         /**
123          * @return
124          */
125         public boolean isPass() {
126                 
127                 return getVerdict().equals(TestCase.PASS);
128
129         }
130
131 }