]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SlcTestUtils.java
1 package org
.argeo
.slc
.core
.test
;
3 import org
.argeo
.slc
.core
.SlcException
;
5 public abstract class SlcTestUtils
{
6 public static String
statusToString(Integer status
) {
7 if (status
.equals(TestStatus
.PASSED
)) {
8 return TestStatus
.STATUSSTR_PASSED
;
9 } else if (status
.equals(TestStatus
.FAILED
)) {
10 return TestStatus
.STATUSSTR_FAILED
;
11 } else if (status
.equals(TestStatus
.ERROR
)) {
12 return TestStatus
.STATUSSTR_ERROR
;
14 throw new SlcException("Unrecognized status " + status
);
18 public static Integer
stringToStatus(String statusStr
) {
19 if (statusStr
.equals(TestStatus
.STATUSSTR_PASSED
)) {
20 return TestStatus
.PASSED
;
21 } else if (statusStr
.equals(TestStatus
.STATUSSTR_FAILED
)) {
22 return TestStatus
.FAILED
;
23 } else if (statusStr
.equals(TestStatus
.STATUSSTR_ERROR
)) {
24 return TestStatus
.ERROR
;
26 throw new SlcException("Unrecognized status string " + statusStr
);
30 private SlcTestUtils() {