Group testing modules (#3014)
* move security content from spring-security-rest-full * swagger update * move query language to new module * rename spring-security-rest-full to spring-rest-full * group persistence modules * group testing modules * try fix conflict
This commit is contained in:
committed by
GitHub
parent
b383d83bf4
commit
776a01429e
+23
@@ -0,0 +1,23 @@
|
||||
package com.baeldung.mock.server;
|
||||
|
||||
import org.mockserver.mock.action.ExpectationCallback;
|
||||
import org.mockserver.model.HttpRequest;
|
||||
import org.mockserver.model.HttpResponse;
|
||||
|
||||
import static org.mockserver.model.HttpResponse.notFoundResponse;
|
||||
import static org.mockserver.model.HttpResponse.response;
|
||||
|
||||
|
||||
public class ExpectationCallbackHandler implements ExpectationCallback {
|
||||
|
||||
public HttpResponse handle(HttpRequest httpRequest) {
|
||||
if (httpRequest.getPath().getValue().endsWith("/callback")) {
|
||||
return httpResponse;
|
||||
} else {
|
||||
return notFoundResponse();
|
||||
}
|
||||
}
|
||||
|
||||
public static HttpResponse httpResponse = response()
|
||||
.withStatusCode(200);
|
||||
}
|
||||
Reference in New Issue
Block a user