|
|
|
@ -53,7 +53,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receive() { |
|
|
|
public void receive() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("payload"); |
|
|
|
Message<?> expected = new GenericMessage<>("payload"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
Message<?> actual = this.template.receive(); |
|
|
|
Message<?> actual = this.template.receive(); |
|
|
|
@ -69,7 +69,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receiveFromDestination() { |
|
|
|
public void receiveFromDestination() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("payload"); |
|
|
|
Message<?> expected = new GenericMessage<>("payload"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
Message<?> actual = this.template.receive("somewhere"); |
|
|
|
Message<?> actual = this.template.receive("somewhere"); |
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +79,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receiveAndConvert() { |
|
|
|
public void receiveAndConvert() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("payload"); |
|
|
|
Message<?> expected = new GenericMessage<>("payload"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
String payload = this.template.receiveAndConvert(String.class); |
|
|
|
String payload = this.template.receiveAndConvert(String.class); |
|
|
|
@ -90,7 +90,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receiveAndConvertFromDestination() { |
|
|
|
public void receiveAndConvertFromDestination() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("payload"); |
|
|
|
Message<?> expected = new GenericMessage<>("payload"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
String payload = this.template.receiveAndConvert("somewhere", String.class); |
|
|
|
String payload = this.template.receiveAndConvert("somewhere", String.class); |
|
|
|
|
|
|
|
|
|
|
|
@ -100,7 +100,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receiveAndConvertFailed() { |
|
|
|
public void receiveAndConvertFailed() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("not a number test"); |
|
|
|
Message<?> expected = new GenericMessage<>("not a number test"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setMessageConverter(new GenericMessageConverter()); |
|
|
|
this.template.setMessageConverter(new GenericMessageConverter()); |
|
|
|
|
|
|
|
|
|
|
|
@ -111,7 +111,7 @@ public class MessageReceivingTemplateTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void receiveAndConvertNoConverter() { |
|
|
|
public void receiveAndConvertNoConverter() { |
|
|
|
Message<?> expected = new GenericMessage<Object>("payload"); |
|
|
|
Message<?> expected = new GenericMessage<>("payload"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setDefaultDestination("home"); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setReceiveMessage(expected); |
|
|
|
this.template.setMessageConverter(new GenericMessageConverter()); |
|
|
|
this.template.setMessageConverter(new GenericMessageConverter()); |
|
|
|
|