--- /dev/null
+package org.argeo.slc.castor;\r
+\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+\r
+public class ExecutionAnswerCastorTest extends AbstractCastorTestCase {\r
+ public void testMarshUnmarshOk() throws Exception {\r
+ ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.OK,\r
+ "No problem!");\r
+ ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
+ assertExecutionAnswer(answer, answerUnm);\r
+ }\r
+\r
+ public void testMarshUnmarshError() throws Exception {\r
+ ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.ERROR,\r
+ "Oooops...");\r
+ ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
+ assertExecutionAnswer(answer, answerUnm);\r
+ }\r
+\r
+ public static void assertExecutionAnswer(ExecutionAnswer expected,\r
+ ExecutionAnswer reached) {\r
+ assertEquals(expected.getStatus(), reached.getStatus());\r
+ assertEquals(expected.getMessage(), reached.getMessage());\r
+ }\r
+}\r