fix:fix checkstyle error.

pull/435/head
SkyeBeFreeman 3 years ago
parent fcdf0fa283
commit 0ed1f0425c

@ -46,6 +46,7 @@ public interface EnhancedFeignPlugin extends Ordered {
* Run the plugin.
*
* @param context context in enhanced feign client.
* @throws Throwable throwable thrown from run method.
*/
void run(EnhancedFeignContext context) throws Throwable;

@ -85,4 +85,17 @@ public class ExceptionPolarisReporterTest {
context.setResponse(response);
exceptionPolarisReporter.run(context);
}
@Test
public void testHandlerThrowable() {
// mock request
Request request = mock(Request.class);
// mock response
Response response = mock(Response.class);
EnhancedFeignContext context = new EnhancedFeignContext();
context.setRequest(request);
context.setResponse(response);
exceptionPolarisReporter.handlerThrowable(context, new RuntimeException("Mock exception."));
}
}

@ -87,4 +87,17 @@ public class SuccessPolarisReporterTest {
context.setResponse(response);
successPolarisReporter.run(context);
}
@Test
public void testHandlerThrowable() {
// mock request
Request request = mock(Request.class);
// mock response
Response response = mock(Response.class);
EnhancedFeignContext context = new EnhancedFeignContext();
context.setRequest(request);
context.setResponse(response);
successPolarisReporter.handlerThrowable(context, new RuntimeException("Mock exception."));
}
}

Loading…
Cancel
Save