Updates for Finchley and boot 2.0

This commit is contained in:
Spencer Gibb
2017-11-30 15:45:02 -05:00
parent c74150a5c4
commit 7bdefab23a
52 changed files with 205 additions and 426 deletions

View File

@@ -1,8 +1,10 @@
package demo;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,7 +36,9 @@ public class StreamBusApplicationTests {
public void streaminess() throws Exception {
Message<String> message = MessageBuilder.withPayload("Hello").build();
this.source.output().send(message);
assertEquals(message, this.collector.forChannel(this.source.output()).take());
Message<?> received = this.collector.forChannel(this.source.output()).take();
assertThat(received.getPayload()).isEqualTo(message.getPayload());
assertThat(received.getHeaders()).containsKeys("contentType", "id", "timestamp");
}
@Test