use of joynr.Reply in project joynr by bmwcarit.
the class SerializationTest method serializeReplyWithJoynrApplicationException.
@Test
public void serializeReplyWithJoynrApplicationException() throws IOException {
ApplicationException error = new ApplicationException(TestEnum.ONE, "detail message");
Reply reply = new Reply(UUID.randomUUID().toString(), error);
String writeValueAsString = objectMapper.writeValueAsString(reply);
System.out.println(writeValueAsString);
Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
Assert.assertEquals(reply, receivedReply);
}
use of joynr.Reply in project joynr by bmwcarit.
the class SerializationTest method serializeReplyWithJoynrHttpException.
@Test
public void serializeReplyWithJoynrHttpException() throws IOException {
JoynrHttpException error = new JoynrHttpException(404, "detail message: JoynrHttpException");
Reply reply = new Reply(UUID.randomUUID().toString(), error);
String writeValueAsString = objectMapper.writeValueAsString(reply);
System.out.println(writeValueAsString);
Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
Assert.assertEquals(reply, receivedReply);
}
use of joynr.Reply in project joynr by bmwcarit.
the class SerializationTest method serializeReplyWithJoynrIllegalAccessException.
@Test
public void serializeReplyWithJoynrIllegalAccessException() throws IOException {
IllegalAccessException error = new IllegalAccessException("detail message: JoynrIllegalAccessException");
Reply reply = new Reply(UUID.randomUUID().toString(), error);
String writeValueAsString = objectMapper.writeValueAsString(reply);
System.out.println(writeValueAsString);
Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
Assert.assertEquals(reply, receivedReply);
}
use of joynr.Reply in project joynr by bmwcarit.
the class SerializationTest method serializeReplyWithJoynrSendBufferFullException.
@Test
public void serializeReplyWithJoynrSendBufferFullException() throws IOException {
JoynrSendBufferFullException error = new JoynrSendBufferFullException(new RejectedExecutionException("cause message"));
Reply reply = new Reply(UUID.randomUUID().toString(), error);
String writeValueAsString = objectMapper.writeValueAsString(reply);
System.out.println(writeValueAsString);
Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
Assert.assertEquals(reply, receivedReply);
}
use of joynr.Reply in project joynr by bmwcarit.
the class SerializationTest method serializeReplyWithDiscoveryException.
@Test
public void serializeReplyWithDiscoveryException() throws IOException {
DiscoveryException error = new DiscoveryException("detail message: DiscoveryException");
Reply reply = new Reply(UUID.randomUUID().toString(), error);
String writeValueAsString = objectMapper.writeValueAsString(reply);
Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
Assert.assertEquals(reply, receivedReply);
}
Aggregations