|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2018 the original author or authors.
|
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -21,11 +21,13 @@ import org.junit.runner.RunWith;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
|
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
import static org.springframework.boot.test.autoconfigure.AutoConfigurationImportedCondition.importedAutoConfiguration;
|
|
|
|
@ -34,6 +36,7 @@ import static org.springframework.boot.test.autoconfigure.AutoConfigurationImpor
|
|
|
|
|
* Tests for the auto-configuration imported by {@link WebFluxTest}.
|
|
|
|
|
*
|
|
|
|
|
* @author Stephane Nicoll
|
|
|
|
|
* @author Artsiom Yudovin
|
|
|
|
|
*/
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
|
@WebFluxTest
|
|
|
|
@ -55,10 +58,21 @@ public class WebFluxTestAutoConfigurationIntegrationTests {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void whatever() {
|
|
|
|
|
WebTestClient client = this.applicationContext.getBean(WebTestClient.class);
|
|
|
|
|
public void mustacheAutoConfigurationIsImported() {
|
|
|
|
|
assertThat(this.applicationContext)
|
|
|
|
|
.has(importedAutoConfiguration(MustacheAutoConfiguration.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void freemarkerAutoConfigurationIsImported() {
|
|
|
|
|
assertThat(this.applicationContext)
|
|
|
|
|
.has(importedAutoConfiguration(FreeMarkerAutoConfiguration.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
System.out.println(client);
|
|
|
|
|
@Test
|
|
|
|
|
public void thymeleafAutoConfigurationIsImported() {
|
|
|
|
|
assertThat(this.applicationContext)
|
|
|
|
|
.has(importedAutoConfiguration(ThymeleafAutoConfiguration.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|