]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/core/test/SimpleResultPart.java
Manage with Maven
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / test / SimpleResultPart.java
index 19fd2d5c275d280941a6290a79dcff9429bb41ec..249fd2149f58a93cd43aa1a4f56ee161e9e71fd8 100644 (file)
@@ -5,24 +5,10 @@ package org.argeo.slc.core.test;
  * Basic implementation of a result part, implementing the standard three status\r
  * approach for test results.\r
  * </p>\r
- * <p>\r
- * <ul>\r
- * <li>{@link #PASSED}: the test succeeded</li>\r
- * <li>{@link #FAILED}: the test could run, but did not reach the expected\r
- * result</li>\r
- * <li>{@link #ERROR}: an error during the test run prevented to get a\r
- * significant information on the tested system.</li>\r
- * </ul>\r
- * </p>\r
+ * \r
+ * @see TestStatus\r
  */\r
-public class SimpleResultPart implements TestResultPart {\r
-\r
-       /** The flag for a passed test: 1 */\r
-       public final static int PASSED = 1;\r
-       /** The flag for a failed test: 2 */\r
-       public final static int FAILED = 2;\r
-       /** The flag for a test which could not properly run because of an error: 3 */\r
-       public final static int ERROR = 3;\r
+public class SimpleResultPart implements TestResultPart, TestStatus {\r
 \r
        /** For ORM */\r
        private Long tid;\r
@@ -31,6 +17,19 @@ public class SimpleResultPart implements TestResultPart {
        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