
com.confluex.mock.http.expectations.MethodExpectation.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of confluex-mock-http Show documentation
Show all versions of confluex-mock-http Show documentation
Testing library for mocking interactions to external HTTP servers
package com.confluex.mock.http.expectations
import com.confluex.mock.http.ClientRequest
import groovy.transform.ToString
@ToString(includeNames = true)
class MethodExpectation implements Expectation {
public static final MethodExpectation GET = new MethodExpectation("GET")
public static final MethodExpectation PUT = new MethodExpectation("PUT")
public static final MethodExpectation DELETE = new MethodExpectation("DELETE")
public static final MethodExpectation POST = new MethodExpectation("POST")
String method
MethodExpectation(String method) {
this.method = method.toUpperCase()
}
Boolean verify(ClientRequest request) {
return request.method?.toUpperCase() == method
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy