@Test public void deviceDelegatingGroovyMarkupViewResolver() throws Exception { load(Collections.<Class<?>>singletonList(GroovyTemplateAutoConfiguration.class), "spring.mobile.devicedelegatingviewresolver.enabled:true"); assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class)) .hasSize(2); assertLiteDeviceDelegatingViewResolver( this.context.getBean(GroovyMarkupViewResolver.class), "deviceDelegatingGroovyMarkupViewResolver"); }
@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 groovyTemplatesAutoConfigurationWasImported() { assertThat(this.applicationContext) .has(importedAutoConfiguration(GroovyTemplateAutoConfiguration.class)); }