]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java
Fix issue with object lists in Castor
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.castor / src / test / java / org / argeo / slc / castor / ExecutionAnswerCastorTest.java
1 package org.argeo.slc.castor;
2
3 import org.argeo.slc.msg.ExecutionAnswer;
4
5 public class ExecutionAnswerCastorTest extends AbstractCastorTestCase {
6 public void testMarshUnmarshOk() throws Exception {
7 ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.OK,
8 "No problem!");
9 ExecutionAnswer answerUnm = marshUnmarsh(answer);
10 assertExecutionAnswer(answer, answerUnm);
11 }
12
13 public void testMarshUnmarshError() throws Exception {
14 ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.ERROR,
15 "Oooops...");
16 ExecutionAnswer answerUnm = marshUnmarsh(answer);
17 assertExecutionAnswer(answer, answerUnm);
18 }
19
20 public static void assertExecutionAnswer(ExecutionAnswer expected,
21 ExecutionAnswer reached) {
22 assertEquals(expected.getStatus(), reached.getStatus());
23 assertEquals(expected.getMessage(), reached.getMessage());
24 }
25 }