1 | String getMethod(){↵ | | 1 | String getFailure(){↵
|
2 | return getPropertyAsString(METHOD);↵ | | 2 | return getPropertyAsString(FAILURE);↵
|
3 | }↵ | | 3 | }↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Method should add the JUnit testXXX method to the list at↵ | | 5 | * set↵
|
6 | * the end, since the sequence matters.↵ | | 6 | the failure message↵
|
7 | * @param methodName↵ | | 7 | * @param fail↵
|
8 | */↵ | | 8 | */↵
|
9 | public void setMethod(String methodName){↵ | | 9 | public void setFailure(String fail){↵
|
10 | setProperty(METHOD,methodName);↵ | | 10 | setProperty(FAILURE,fail);↵
|
11 | }↵ | | 11 | }↵
|
12 | ↵ | | 12 | ↵
|
13 | /**↵ | | 13 | /**↵
|
14 | * get the success message↵ | | 14 | * The failure code is used by other components↵
|
15 | */↵ | | 15 | */↵
|
16 | public String getSuccess(){↵ | | 16 | public String getFailureCode(){↵
|
17 | return getPropertyAsString(SUCCESS);↵ | | 17 | return getPropertyAsString(FAILURECODE);↵
|
18 | }↵ | | 18 | }↵
|
19 | ↵ | | 19 | ↵
|
20 | /**↵ | | 20 | /**↵
|
21 | * set the success message↵ | | 21 | * Provide some unique code to denote a type of failure↵
|
22 | * @param success↵ | | 22 | * @param code↵
|
23 | */↵ | | 23 | */↵
|
24 | public void setSuccess(String success){↵ | | 24 | public void setFailureCode(String code){↵
|
25 | setProperty(SUCCESS,success);↵ | | 25 | setProperty(FAILURECODE,code);↵
|
26 | }↵ | | 26 | }↵
|
27 | ↵ | | |
|
28 | /**↵ | | 27 | /**↵
|
29 | * get the success code defined by the user↵ | | 28 | * return the descriptive error for the test↵
|
30 | */↵ | | 29 | */↵
|
31 | public String getSuccessCode(){↵ | | 30 | public String getError(){↵
|
32 | return getPropertyAsString(SUCCESSCODE);↵ | | 31 | return getPropertyAsString(ERROR);↵
|
33 | }↵ | | 32 | }↵
|
| | | 33 | ↵
|
34 | /**↵ | | 34 | /**↵
|
35 | * set the succes code. the success code should↵ | | 35 | * provide a descriptive error for the test method. ↵
|
36 | * be unique.↵ | | 36 | For↵
|
| | | 37 | * a description of the difference between failure and↵
|
| | | 38 | * error, please refer to the following url↵
|
| | | 39 | * http://junit.sourceforge.net/doc/faq/faq.htm#tests_9↵
|
37 | * @param code↵ | | 40 | * @param error↵
|
38 | */↵ | | 41 | */↵
|
39 | public void setSuccessCode(String code){↵ | | 42 | public void setError(String error){↵
|
40 | setProperty(SUCCESSCODE,code);↵ | | 43 | setProperty(ERROR,error);↵
|
41 | }↵ | | 44 | }↵
|
42 | ↵ | | 45 | ↵
|
43 | /**↵ | | 46 | /**↵
|
44 | * get the failure message↵ | | 47 | * return the error code for the test method. it should↵
|
| | | 48 | * be an unique error code.↵
|
45 | */↵ | | 49 | */↵
|
46 | public String getFailure(){↵ | | 50 | public String getErrorCode(){↵
|
47 | return getPropertyAsString(FAILURE);↵ | | 51 | return getPropertyAsString(ERRORCODE);↵
|
48 | | | 52 |
|