Polishing

This commit is contained in:
Sam Brannen
2023-11-30 19:04:59 +01:00
parent 8ff687b68c
commit 6ea9fdbf77
36 changed files with 126 additions and 120 deletions

View File

@@ -75,7 +75,7 @@ class ResourceHandlerRegistryTests {
@Test
void noResourceHandlers() {
this.registry = new ResourceHandlerRegistry(new GenericApplicationContext());
assertThat((Object) this.registry.getHandlerMapping()).isNull();
assertThat(this.registry.getHandlerMapping()).isNull();
}
@Test

View File

@@ -495,7 +495,7 @@ class ResourceWebHandlerTests {
setBestMachingPattern(exchange, "/**");
this.handler.handle(exchange).block(TIMEOUT);
assertThat((Object) exchange.getResponse().getStatusCode()).isNull();
assertThat(exchange.getResponse().getStatusCode()).isNull();
assertResponseBody(exchange, "h1 { color:red; }");
}
@@ -522,7 +522,7 @@ class ResourceWebHandlerTests {
setPathWithinHandlerMapping(exchange, "foo.css");
setBestMachingPattern(exchange, "/**");
this.handler.handle(exchange).block(TIMEOUT);
assertThat((Object) exchange.getResponse().getStatusCode()).isNull();
assertThat(exchange.getResponse().getStatusCode()).isNull();
assertResponseBody(exchange, "h1 { color:red; }");
}

View File

@@ -84,7 +84,7 @@ class VersionResourceResolverTests {
.resolveResourceInternal(null, file, this.locations, this.chain)
.block(Duration.ofMillis(5000));
assertThat((Object) actual).isNull();
assertThat(actual).isNull();
verify(this.chain, times(1)).resolveResource(null, file, this.locations);
}
@@ -99,7 +99,7 @@ class VersionResourceResolverTests {
.resolveResourceInternal(null, file, this.locations, this.chain)
.block(Duration.ofMillis(5000));
assertThat((Object) actual).isNull();
assertThat(actual).isNull();
verify(this.chain, times(1)).resolveResource(null, file, this.locations);
verify(this.versionStrategy, times(1)).extractVersion(file);
}
@@ -119,7 +119,7 @@ class VersionResourceResolverTests {
.resolveResourceInternal(null, versionFile, this.locations, this.chain)
.block(Duration.ofMillis(5000));
assertThat((Object) actual).isNull();
assertThat(actual).isNull();
verify(this.versionStrategy, times(1)).removeVersion(versionFile, version);
}
@@ -140,7 +140,7 @@ class VersionResourceResolverTests {
.resolveResourceInternal(null, versionFile, this.locations, this.chain)
.block(Duration.ofMillis(5000));
assertThat((Object) actual).isNull();
assertThat(actual).isNull();
verify(this.versionStrategy, times(1)).getResourceVersion(expected);
}