This commit is contained in:
Rossen Stoyanchev
2019-03-22 13:47:18 -04:00
parent 6c33af0a1c
commit c0be1c5100
4 changed files with 40 additions and 60 deletions

View File

@@ -117,7 +117,8 @@ public class ProducesRequestConditionTests {
ProducesRequestCondition xml = new ProducesRequestCondition("application/xml");
ProducesRequestCondition none = new ProducesRequestCondition();
MockServerWebExchange exchange = MockServerWebExchange.from(get("/").header("Accept", "application/xml, text/html"));
MockServerWebExchange exchange = MockServerWebExchange.from(get("/")
.header("Accept", "application/xml, text/html"));
assertTrue(html.compareTo(xml, exchange) > 0);
assertTrue(xml.compareTo(html, exchange) < 0);
@@ -135,8 +136,8 @@ public class ProducesRequestConditionTests {
exchange = MockServerWebExchange.from(
get("/").header("Accept", "application/pdf"));
assertTrue(html.compareTo(xml, exchange) == 0);
assertTrue(xml.compareTo(html, exchange) == 0);
assertEquals(0, html.compareTo(xml, exchange));
assertEquals(0, xml.compareTo(html, exchange));
// See SPR-7000
exchange = MockServerWebExchange.from(