mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Polishing
See gh-35861
This commit is contained in:
@@ -17,9 +17,7 @@
|
||||
package org.springframework.test.http;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -43,9 +41,6 @@ import org.springframework.http.HttpHeaders;
|
||||
*/
|
||||
public class HttpHeadersAssert extends AbstractObjectAssert<HttpHeadersAssert, HttpHeaders> {
|
||||
|
||||
private static final ZoneId GMT = ZoneOffset.UTC;
|
||||
|
||||
|
||||
private final AbstractCollectionAssert<?, Collection<? extends String>, String, ObjectAssert<String>> namesAssert;
|
||||
|
||||
|
||||
@@ -174,7 +169,7 @@ public class HttpHeadersAssert extends AbstractObjectAssert<HttpHeadersAssert, H
|
||||
containsHeader(name);
|
||||
Assertions.assertThat(this.actual.getFirstZonedDateTime(name))
|
||||
.as("check primary date value for HTTP header '%s'", name)
|
||||
.isCloseTo(value.atZone(GMT), Assertions.within(999, ChronoUnit.MILLIS));
|
||||
.isCloseTo(value.atZone(ZoneOffset.UTC), Assertions.within(999, ChronoUnit.MILLIS));
|
||||
return this.myself;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user