diff --git a/spring-cloud/spring-cloud-stream/pom.xml b/spring-cloud/spring-cloud-stream/pom.xml index 352b52cc17..2104ba1827 100644 --- a/spring-cloud/spring-cloud-stream/pom.xml +++ b/spring-cloud/spring-cloud-stream/pom.xml @@ -1,70 +1,70 @@ - 4.0.0 + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.baeldung - spring-cloud-stream - - spring-cloud-stream-rabbit - - pom + org.baeldung + spring-cloud-stream + + spring-cloud-stream-rabbit + + pom - spring-cloud-stream + spring-cloud-stream - - com.baeldung.spring.cloud - spring-cloud - 1.0.0-SNAPSHOT - + + com.baeldung.spring.cloud + spring-cloud + 1.0.0-SNAPSHOT + - - UTF-8 - 3.6.0 - + + UTF-8 + 3.6.0 + - - - - org.springframework.cloud - spring-cloud-starter-stream-rabbit - ${spring-cloud-stream.version} - - - - org.springframework.cloud - spring-cloud-stream - ${spring-cloud-stream.version} - + + + + org.springframework.cloud + spring-cloud-starter-stream-rabbit + ${spring-cloud-stream.version} + + + + org.springframework.cloud + spring-cloud-stream + ${spring-cloud-stream.version} + - - org.springframework.cloud - spring-cloud-stream-test-support - ${spring-cloud-stream.version} - test - - - + + org.springframework.cloud + spring-cloud-stream-test-support + ${spring-cloud-stream.version} + test + + + - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring-boot-maven-plugin.version} - - - - + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + 1.8 + 1.8 + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-maven-plugin.version} + + + + diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml index 9eede9e92c..a954a7035e 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml @@ -17,17 +17,16 @@ - org.springframework.cloud - spring-cloud-starter-stream-rabbit + spring-cloud-starter-stream-rabbit - org.springframework.cloud - spring-cloud-stream-test-support - test - + org.springframework.cloud + spring-cloud-stream-test-support + test + diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsServiceApplicationTests.java b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsServiceApplicationTests.java index 18dcd8da7c..196d4f0d23 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsServiceApplicationTests.java +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsServiceApplicationTests.java @@ -26,13 +26,13 @@ public class MultipleOutputsServiceApplicationTests { private MessageCollector messageCollector; @Test - public void shouldReceiveMessageInAnOutput() { + public void whenSendMessage_thenResponseIsInAOutput() { whenSendMessage(1); thenPayloadInChannelIs(pipe.anOutput(), 1); } @Test - public void shouldReceiveMessageInAnAnotherOutput() { + public void whenSendMessage_thenResponseIsInAnotherOutput() { whenSendMessage(11); thenPayloadInChannelIs(pipe.anotherOutput(), 11); } diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsWithConditionsServiceApplicationTests.java b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsWithConditionsServiceApplicationTests.java index 02638dea4c..a74ee61be6 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsWithConditionsServiceApplicationTests.java +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MultipleOutputsWithConditionsServiceApplicationTests.java @@ -26,13 +26,13 @@ public class MultipleOutputsWithConditionsServiceApplicationTests { private MessageCollector messageCollector; @Test - public void shouldReceiveMessageInAnOutput() { + public void whenSendMessage_thenResponseIsInAOutput() { whenSendMessage(1); thenPayloadInChannelIs(pipe.anotherOutput(), 1); } @Test - public void shouldReceiveMessageInAnAnotherOutput() { + public void whenSendMessage_thenResponseIsInAnotherOutput() { whenSendMessage(11); thenPayloadInChannelIs(pipe.anotherOutput(), 11); } diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MyLoggerApplicationTests.java b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MyLoggerApplicationTests.java index d004987929..b939af25fc 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MyLoggerApplicationTests.java +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/src/test/java/com/baeldung/spring/cloud/stream/rabbit/MyLoggerApplicationTests.java @@ -12,7 +12,6 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.baeldung.spring.cloud.stream.rabbit.MyLoggerServiceApplication; import com.baeldung.spring.cloud.stream.rabbit.model.LogMessage; @RunWith(SpringJUnit4ClassRunner.class) @@ -27,18 +26,15 @@ public class MyLoggerApplicationTests { private MessageCollector messageCollector; @Test - public void shouldEnrichMessage() { - // Send message + public void whenSendMessage_thenResponseShouldUpdateText() { pipe.input() .send(MessageBuilder.withPayload(new LogMessage("This is my message")) .build()); - // Get response from the service Object payload = messageCollector.forChannel(pipe.output()) .poll() .getPayload(); - // Assert assertEquals("[1]: This is my message", payload.toString()); } }