Ensure composite wrapper type reflects reality

When a Supplier<Flux<Foo>> is composed with a Function<Foo,Bar>
the resulting handler (supplier) should have Flux as its output
wrapper still (the most general output wrapper type in the chain).
This commit is contained in:
Dave Syer
2018-03-16 08:30:33 -04:00
parent 47f86671ca
commit 773dddbe68
5 changed files with 72 additions and 11 deletions

View File

@@ -51,6 +51,13 @@ public class SampleApplicationTests {
String.class)).isEqualTo("[{\"value\":\"FOO\"}]");
}
@Test
public void composite() {
assertThat(new TestRestTemplate()
.getForObject("http://localhost:" + port + "/words,uppercase", String.class))
.isEqualTo("[{\"value\":\"FOO\"},{\"value\":\"BAR\"}]");
}
@Test
public void single() {
assertThat(new TestRestTemplate().postForObject(