Browse Source

Migrates test to assertJ

Fixes gh-1676
pull/1760/head
spencergibb 5 years ago
parent
commit
f1fb512ea1
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 13
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/RouteConstructionIntegrationTests.java

13
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/RouteConstructionIntegrationTests.java

@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
package org.springframework.cloud.gateway.test;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.boot.SpringBootConfiguration;
@ -27,16 +25,15 @@ import org.springframework.cloud.gateway.filter.GatewayFilter; @@ -27,16 +25,15 @@ import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.context.annotation.Bean;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
public class RouteConstructionIntegrationTests {
@Test
@Ignore // FIXME: https://github.com/spring-cloud/spring-cloud-gateway/issues/1676
public void routesWithVerificationShouldFail() {
Assert.assertThrows("java.lang.AssertionError: Stop right now!", Throwable.class,
() -> {
new SpringApplicationBuilder(TestConfig.class)
.profiles("verification-route").run();
});
assertThatThrownBy(() -> new SpringApplicationBuilder(TestConfig.class)
.profiles("verification-route").run())
.hasMessageContaining("Stop right now!");
}
@EnableAutoConfiguration

Loading…
Cancel
Save