All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.confluex.mule.test.http.expectations.MethodExpectation.groovy Maven / Gradle / Ivy

There is a newer version: 0.4.3
Show newest version
package com.confluex.mule.test.http.expectations

import com.confluex.mule.test.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