Package com.github.dreamhead.moco.resource

Examples of com.github.dreamhead.moco.resource.Resource


        }
    }

    @Override
    public RequestMatcher apply(final MocoConfig config) {
        Resource appliedResource = this.resource.apply(config);
        if (appliedResource == this.resource) {
            return this;
        }

        return new JsonRequestMatcher(this.extractor, appliedResource);
View Full Code Here


        ResponseHandler handler = super.apply(config);
        if (handler != this) {
            return handler;
        }

        Resource resource = this.resource.apply(config);
        if (resource != this.resource) {
            return new ContentHandler((ContentResource) resource);
        }

        return this;
View Full Code Here

        ResponseHandler handler = super.apply(config);
        if (handler != this) {
            return handler;
        }

        Resource resource = this.resource.apply(config);
        if (resource != this.resource) {
            return new HeaderResponseHandler(name, resource);
        }

        return this;
View Full Code Here

        return false;
    }

    @Override
    public RequestMatcher apply(final MocoConfig config) {
        Resource appliedResource = expected.apply(config);
        if (appliedResource == expected) {
            return this;
        }

        return newMatcher(extractor, appliedResource);
View Full Code Here

        return this;
    }

    private MocoEventAction applyContent(final MocoConfig config, final ContentResource originalContent) {
        Resource content = originalContent.apply(config);
        if (content != originalContent) {
            return new MocoRequestAction(this.url, this.method, of((ContentResource) content));
        }

        return this;
View Full Code Here

TOP

Related Classes of com.github.dreamhead.moco.resource.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.