Skip to content

Commit

Permalink
Revert.
Browse files Browse the repository at this point in the history
  • Loading branch information
alimate committed Mar 26, 2019
1 parent d90d592 commit ae10888
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebExceptionHandler;

Expand All @@ -28,6 +29,7 @@
* @author Madhura Bhave
* @author Ali Dehghani
*/
@Component
public class ExampleWebExceptionHandler implements WebExceptionHandler {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.WebTestClient;
Expand All @@ -33,7 +29,6 @@
* Tests for {@link WebFluxTest} when no explicit controller is defined.
*
* @author Stephane Nicoll
* @author Ali Dehghani
*/
@RunWith(SpringRunner.class)
@WithMockUser
Expand Down Expand Up @@ -65,19 +60,4 @@ public void shouldFindJsonController() {
this.webClient.get().uri("/json").exchange().expectStatus().isOk();
}

/**
* A test configuration to register a custom exception handler. Since the registered
* handler has the highest possible priority, the default exception handler provided
* by the Spring Boot will not get a chance to handle exceptions.
*/
@TestConfiguration
static class TestConfig {

@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
ExampleWebExceptionHandler exampleWebExceptionHandler() {
return new ExampleWebExceptionHandler();
}
}

}

This file was deleted.

0 comments on commit ae10888

Please sign in to comment.