Fix broken ToStringVisitorTests

Tests were broken due to the switch to Set.of(...) in
2b65f274dc.
This commit is contained in:
Sam Brannen
2022-05-07 16:45:46 +02:00
parent a69d9716c9
commit 9b1c8a3a5c
2 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,7 +71,10 @@ public class ToStringVisitorTests {
testPredicate(pathExtension("foo"), "*.foo");
testPredicate(contentType(MediaType.APPLICATION_JSON), "Content-Type: application/json");
testPredicate(contentType(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN), "Content-Type: [application/json, text/plain]");
ToStringVisitor visitor = new ToStringVisitor();
contentType(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN).accept(visitor);
assertThat(visitor.toString()).matches("Content-Type: \\[.+, .+\\]").contains("application/json", "text/plain");
testPredicate(accept(MediaType.APPLICATION_JSON), "Accept: application/json");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,7 +70,10 @@ public class ToStringVisitorTests {
testPredicate(pathExtension("foo"), "*.foo");
testPredicate(contentType(MediaType.APPLICATION_JSON), "Content-Type: application/json");
testPredicate(contentType(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN), "Content-Type: [application/json, text/plain]");
ToStringVisitor visitor = new ToStringVisitor();
contentType(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN).accept(visitor);
assertThat(visitor.toString()).matches("Content-Type: \\[.+, .+\\]").contains("application/json", "text/plain");
testPredicate(accept(MediaType.APPLICATION_JSON), "Accept: application/json");