@Test public void deviceDelegatingMustacheViewResolver() throws Exception { load(Collections.<Class<?>>singletonList(MustacheAutoConfiguration.class), "spring.mobile.devicedelegatingviewresolver.enabled:true"); assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class)) .hasSize(2); assertLiteDeviceDelegatingViewResolver( this.context.getBean(MustacheViewResolver.class), "deviceDelegatingMustacheViewResolver"); }
@Test public void deviceDelegatingViewResolverDisabled() throws Exception { load(Arrays.asList(FreeMarkerAutoConfiguration.class, GroovyTemplateAutoConfiguration.class, MustacheAutoConfiguration.class, ThymeleafAutoConfiguration.class), "spring.mobile.devicedelegatingviewresolver.enabled:false"); assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class)) .hasSize(0); }
@Test public void mustacheAutoConfigurationWasImported() { assertThat(this.applicationContext) .has(importedAutoConfiguration(MustacheAutoConfiguration.class)); }