Search in sources :

Example 1 with NoopDiscoveryClient

use of org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient in project spring-boot-admin by codecentric.

the class TurbineRouteLocatorTest method test_route_noservice.

@Test(expected = IllegalStateException.class)
public void test_route_noservice() {
    ZuulRoute route = new ZuulRoute("/path/**", "turbine");
    DiscoveryClient discovery = new NoopDiscoveryClient(null);
    TurbineRouteLocator locator = new TurbineRouteLocator(route, "", new ZuulProperties(), discovery);
    locator.getMatchingRoute("/path/foo");
}
Also used : ZuulRoute(org.springframework.cloud.netflix.zuul.filters.ZuulProperties.ZuulRoute) ZuulProperties(org.springframework.cloud.netflix.zuul.filters.ZuulProperties) DiscoveryClient(org.springframework.cloud.client.discovery.DiscoveryClient) NoopDiscoveryClient(org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient) NoopDiscoveryClient(org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DiscoveryClient (org.springframework.cloud.client.discovery.DiscoveryClient)1 NoopDiscoveryClient (org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient)1 ZuulProperties (org.springframework.cloud.netflix.zuul.filters.ZuulProperties)1 ZuulRoute (org.springframework.cloud.netflix.zuul.filters.ZuulProperties.ZuulRoute)1