|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -150,9 +150,9 @@ public final class MockRestServiceServer { |
|
|
|
* to reply to the given {@code RestGatewaySupport}. |
|
|
|
* to reply to the given {@code RestGatewaySupport}. |
|
|
|
* @since 4.3 |
|
|
|
* @since 4.3 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static MockRestServiceServerBuilder bindTo(RestGatewaySupport restGateway) { |
|
|
|
public static MockRestServiceServerBuilder bindTo(RestGatewaySupport restGatewaySupport) { |
|
|
|
Assert.notNull(restGateway, "'gatewaySupport' must not be null"); |
|
|
|
Assert.notNull(restGatewaySupport, "'restGatewaySupport' must not be null"); |
|
|
|
return new DefaultBuilder(restGateway.getRestTemplate()); |
|
|
|
return new DefaultBuilder(restGatewaySupport.getRestTemplate()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -312,12 +312,12 @@ public final class MockRestServiceServer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private org.springframework.mock.http.client.MockAsyncClientHttpRequest createRequestInternal( |
|
|
|
private org.springframework.mock.http.client.MockAsyncClientHttpRequest createRequestInternal( |
|
|
|
URI uri, HttpMethod method) { |
|
|
|
URI uri, HttpMethod httpMethod) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(uri, "'uri' must not be null"); |
|
|
|
Assert.notNull(uri, "'uri' must not be null"); |
|
|
|
Assert.notNull(method, "'httpMethod' must not be null"); |
|
|
|
Assert.notNull(httpMethod, "'httpMethod' must not be null"); |
|
|
|
|
|
|
|
|
|
|
|
return new org.springframework.mock.http.client.MockAsyncClientHttpRequest(method, uri) { |
|
|
|
return new org.springframework.mock.http.client.MockAsyncClientHttpRequest(httpMethod, uri) { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected ClientHttpResponse executeInternal() throws IOException { |
|
|
|
protected ClientHttpResponse executeInternal() throws IOException { |
|
|
|