]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java
Improve formatting of the code.
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / test / SimpleResultPart.java
index 2eaa9e59e4de133103f3c3b06a14756f628a3390..249fd2149f58a93cd43aa1a4f56ee161e9e71fd8 100644 (file)
@@ -1,15 +1,35 @@
 package org.argeo.slc.core.test;\r
 \r
-public class SimpleResultPart implements TestResultPart {\r
+/**\r
+ * <p>\r
+ * Basic implementation of a result part, implementing the standard three status\r
+ * approach for test results.\r
+ * </p>\r
+ * \r
+ * @see TestStatus\r
+ */\r
+public class SimpleResultPart implements TestResultPart, TestStatus {\r
 \r
-       public final static Integer PASSED = 1;\r
-       public final static Integer FAILED = 2;\r
-       public final static Integer ERROR = 3;\r
+       /** For ORM */\r
+       private Long tid;\r
 \r
        private Integer status;\r
        private String message;\r
        private Throwable exception;\r
 \r
+       public SimpleResultPart() {\r
+       }\r
+\r
+       public SimpleResultPart(Integer status, String message) {\r
+               this(status, message, null);\r
+       }\r
+\r
+       public SimpleResultPart(Integer status, String message, Throwable exception) {\r
+               this.status = status;\r
+               this.message = message;\r
+               this.exception = exception;\r
+       }\r
+\r
        public String getMessage() {\r
                return message;\r
        }\r
@@ -51,4 +71,12 @@ public class SimpleResultPart implements TestResultPart {
                return buf.toString();\r
        }\r
 \r
+       Long getTid() {\r
+               return tid;\r
+       }\r
+\r
+       void setTid(Long tid) {\r
+               this.tid = tid;\r
+       }\r
+\r
 }\r