Package com.github.dreamhead.moco.model

Examples of com.github.dreamhead.moco.model.HttpRequestFailoverMatcher


                .withMethod("POST")
                .withContent("proxy")
                .withHeaders(of("Cookie", "loggedIn=true", "Host", "localhost:12306"))
                .build();

        assertThat(new HttpRequestFailoverMatcher(request).match(request), is(true));
    }
View Full Code Here


                .withMethod("POST")
                .withContent("different")
                .withHeaders(of("Cookie", "loggedIn=true", "Host", "localhost:12306"))
                .build();

        assertThat(new HttpRequestFailoverMatcher(request).match(another), is(false));
    }
View Full Code Here

                .withContent("proxy")
                .withUri("/bar")
                .withHeaders(of("Cookie", "loggedIn=true", "Host", "localhost:12306"))
                .build();

        assertThat(new HttpRequestFailoverMatcher(request).match(another), is(false));
    }
View Full Code Here

                .withMethod("POST")
                .withContent("proxy")
                .withHeaders(of("Cookie", "loggedIn=true", "Host", "localhost:12306"))
                .build();

        assertThat(new HttpRequestFailoverMatcher(failover).match(request), is(true));
    }
View Full Code Here

                .withMethod("POST")
                .withContent("proxy")
                .withHeaders(of("Host", "localhost:12306"))
                .build();

        assertThat(new HttpRequestFailoverMatcher(failover).match(request), is(true));
    }
View Full Code Here

    private Predicate<Session> isForRequest(final HttpRequest dumpedRequest) {
        return new Predicate<Session>() {
            @Override
            public boolean apply(Session session) {
                HttpRequest request = session.getRequest();
                return new HttpRequestFailoverMatcher(request).match(dumpedRequest);
            }
        };
    }
View Full Code Here

TOP

Related Classes of com.github.dreamhead.moco.model.HttpRequestFailoverMatcher

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.