Skip to content

Commit

Permalink
Polish "Check that WebClient is available"
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Nov 25, 2020
1 parent f6255cc commit f248cfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 68 deletions.

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
Expand All @@ -17,7 +17,6 @@

import java.util.Collections;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import org.springframework.boot.test.context.SpringBootTest;
Expand All @@ -31,26 +30,21 @@
* the classpath.
*
* @author Tobias Gesellchen
* @author Stephane Nicoll
*/
@ClassPathExclusions("spring-webflux*.jar")
public class WebTestClientContextCustomizerFactoryWithoutWebfluxTest {

WebTestClientContextCustomizerFactory contextCustomizerFactory;

@BeforeEach
void setup() {
this.contextCustomizerFactory = new WebTestClientContextCustomizerFactory();
}
public class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests {

@Test
void doNotCreateContextCustomizer() {
ContextCustomizer contextCustomizer = this.contextCustomizerFactory.createContextCustomizer(TestClass.class,
void customizerIsNotCreatedWithoutWebClient() {
WebTestClientContextCustomizerFactory contextCustomizerFactory = new WebTestClientContextCustomizerFactory();
ContextCustomizer contextCustomizer = contextCustomizerFactory.createContextCustomizer(TestClass.class,
Collections.emptyList());
assertThat(contextCustomizer).isNull();
}

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
static class TestClass {
private static class TestClass {

}

Expand Down

0 comments on commit f248cfe

Please sign in to comment.