Merge pull request #16478 from dreis2211

* pr/16478:
  Fix Thymeleaf deprecations
pull/16480/head
Stephane Nicoll 6 years ago
commit 424d98ce3e

@ -21,7 +21,7 @@ import java.util.Collections;
import java.util.Locale;
import nz.net.ultraq.thymeleaf.LayoutDialect;
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy;
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingRespectLayoutTitleStrategy;
import org.junit.Rule;
import org.junit.Test;
import org.thymeleaf.TemplateEngine;
@ -262,7 +262,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
.run((context) -> assertThat(ReflectionTestUtils.getField(
context.getBean(LayoutDialect.class), "sortingStrategy"))
.isInstanceOf(GroupingStrategy.class));
.isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
}
@Configuration(proxyBeanMethods = false)
@ -270,7 +270,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
@Bean
public LayoutDialect layoutDialect() {
return new LayoutDialect(new GroupingStrategy());
return new LayoutDialect(new GroupingRespectLayoutTitleStrategy());
}
}

@ -25,7 +25,7 @@ import java.util.Map;
import javax.servlet.DispatcherType;
import nz.net.ultraq.thymeleaf.LayoutDialect;
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy;
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingRespectLayoutTitleStrategy;
import org.junit.Rule;
import org.junit.Test;
import org.thymeleaf.TemplateEngine;
@ -349,7 +349,7 @@ public class ThymeleafServletAutoConfigurationTests {
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
.run((context) -> assertThat(ReflectionTestUtils.getField(
context.getBean(LayoutDialect.class), "sortingStrategy"))
.isInstanceOf(GroupingStrategy.class));
.isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
}
@Test
@ -369,7 +369,7 @@ public class ThymeleafServletAutoConfigurationTests {
@Bean
public LayoutDialect layoutDialect() {
return new LayoutDialect(new GroupingStrategy());
return new LayoutDialect(new GroupingRespectLayoutTitleStrategy());
}
}

Loading…
Cancel
Save