|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2024 the original author or authors. |
| 2 | + * Copyright 2002-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -78,11 +78,29 @@ void doesNotContainHeaderWithNamePresent() {
|
78 | 78 | @Test
|
79 | 79 | void doesNotContainHeaders() {
|
80 | 80 | assertThat(Map.of("first", "1", "third", "3"))
|
81 |
| - .doesNotContainsHeaders("second", "fourth"); |
| 81 | + .doesNotContainHeaders("second", "fourth"); |
82 | 82 | }
|
83 | 83 |
|
84 | 84 | @Test
|
85 | 85 | void doesNotContainHeadersWithSeveralNamesPresent() {
|
| 86 | + Map<String, String> map = Map.of("first", "1", "second", "2", "third", "3"); |
| 87 | + assertThatExceptionOfType(AssertionError.class) |
| 88 | + .isThrownBy(() -> assertThat(map).doesNotContainHeaders("first", "another-wrong-name", "second")) |
| 89 | + .withMessageContainingAll("HTTP headers", "first", "second"); |
| 90 | + } |
| 91 | + |
| 92 | + @Test |
| 93 | + @Deprecated(forRemoval = true) |
| 94 | + @SuppressWarnings("removal") |
| 95 | + void doesNotContainHeadersWithDeprecatedMethod() { |
| 96 | + assertThat(Map.of("first", "1", "third", "3")) |
| 97 | + .doesNotContainsHeaders("second", "fourth"); |
| 98 | + } |
| 99 | + |
| 100 | + @Test |
| 101 | + @Deprecated(forRemoval = true) |
| 102 | + @SuppressWarnings("removal") |
| 103 | + void doesNotContainHeadersWithSeveralNamesPresentWithDeprecatedMethod() { |
86 | 104 | Map<String, String> map = Map.of("first", "1", "second", "2", "third", "3");
|
87 | 105 | assertThatExceptionOfType(AssertionError.class)
|
88 | 106 | .isThrownBy(() -> assertThat(map).doesNotContainsHeaders("first", "another-wrong-name", "second"))
|
|
0 commit comments