Polishing
This commit is contained in:
@@ -686,7 +686,7 @@ public class DispatcherServletTests {
|
||||
assertThat(myServlet.getServletConfig().getServletName()).isEqualTo("complex");
|
||||
assertThat(myServlet.getServletConfig().getServletContext()).isEqualTo(getServletContext());
|
||||
complexDispatcherServlet.destroy();
|
||||
assertThat((Object) myServlet.getServletConfig()).isNull();
|
||||
assertThat(myServlet.getServletConfig()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -540,7 +540,7 @@ public class MvcNamespaceTests {
|
||||
|
||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||
ModelAndView mv = adapter.handle(request, response, chain.getHandler());
|
||||
assertThat((Object) mv).isNull();
|
||||
assertThat(mv).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -566,7 +566,7 @@ public class MvcNamespaceTests {
|
||||
|
||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||
ModelAndView mv = adapter.handle(request, response, chain.getHandler());
|
||||
assertThat((Object) mv).isNull();
|
||||
assertThat(mv).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -624,7 +624,7 @@ public class MvcNamespaceTests {
|
||||
assertThat(chain.getInterceptorList().get(2)).isInstanceOf(LocaleChangeInterceptor.class);
|
||||
assertThat(chain.getInterceptorList().get(3)).isInstanceOf(ThemeChangeInterceptor.class);
|
||||
ModelAndView mv = adapter.handle(request, new MockHttpServletResponse(), chain.getHandler());
|
||||
assertThat((Object) mv.getViewName()).isNull();
|
||||
assertThat(mv.getViewName()).isNull();
|
||||
|
||||
request = new MockHttpServletRequest("GET", "/myapp/app/bar");
|
||||
request.setContextPath("/myapp");
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ResourceHandlerRegistryTests {
|
||||
@Test
|
||||
public void noResourceHandlers() {
|
||||
this.registry = new ResourceHandlerRegistry(new GenericWebApplicationContext(), new MockServletContext());
|
||||
assertThat((Object) this.registry.getHandlerMapping()).isNull();
|
||||
assertThat(this.registry.getHandlerMapping()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -97,7 +97,7 @@ public class ResourceUrlProviderTests {
|
||||
request.setRequestURI("/contextpath-longer-than-request-path/style.css");
|
||||
String url = "/resources/foo.css";
|
||||
String resolvedUrl = this.urlProvider.getForRequestUrl(request, url);
|
||||
assertThat((Object) resolvedUrl).isNull();
|
||||
assertThat(resolvedUrl).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -73,7 +73,7 @@ class VersionResourceResolverTests {
|
||||
|
||||
this.resolver.setStrategyMap(Collections.emptyMap());
|
||||
Resource actual = this.resolver.resolveResourceInternal(null, file, this.locations, this.chain);
|
||||
assertThat((Object) actual).isNull();
|
||||
assertThat(actual).isNull();
|
||||
verify(this.chain, times(1)).resolveResource(null, file, this.locations);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class VersionResourceResolverTests {
|
||||
|
||||
this.resolver.setStrategyMap(Collections.singletonMap("/**", this.versionStrategy));
|
||||
Resource actual = this.resolver.resolveResourceInternal(null, file, this.locations, this.chain);
|
||||
assertThat((Object) actual).isNull();
|
||||
assertThat(actual).isNull();
|
||||
verify(this.chain, times(1)).resolveResource(null, file, this.locations);
|
||||
verify(this.versionStrategy, times(1)).extractVersion(file);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class VersionResourceResolverTests {
|
||||
|
||||
this.resolver.setStrategyMap(Collections.singletonMap("/**", this.versionStrategy));
|
||||
Resource actual = this.resolver.resolveResourceInternal(null, versionFile, this.locations, this.chain);
|
||||
assertThat((Object) actual).isNull();
|
||||
assertThat(actual).isNull();
|
||||
verify(this.versionStrategy, times(1)).removeVersion(versionFile, version);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class VersionResourceResolverTests {
|
||||
|
||||
this.resolver.setStrategyMap(Collections.singletonMap("/**", this.versionStrategy));
|
||||
Resource actual = this.resolver.resolveResourceInternal(null, versionFile, this.locations, this.chain);
|
||||
assertThat((Object) actual).isNull();
|
||||
assertThat(actual).isNull();
|
||||
verify(this.versionStrategy, times(1)).getResourceVersion(expected);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ public class ResourceBundleViewResolverTests {
|
||||
|
||||
@Test
|
||||
public void noSuchViewEnglish() throws Exception {
|
||||
assertThat((Object) rb.resolveViewName("xxxxxxweorqiwuopeir", Locale.ENGLISH)).isNull();
|
||||
assertThat(rb.resolveViewName("xxxxxxweorqiwuopeir", Locale.ENGLISH)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -126,7 +126,7 @@ public class MappingJackson2JsonViewTests {
|
||||
|
||||
view.render(model, request, response);
|
||||
|
||||
assertThat((Object) response.getHeader("Cache-Control")).isNull();
|
||||
assertThat(response.getHeader("Cache-Control")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user