Package com.github.restdriver.clientdriver

Examples of com.github.restdriver.clientdriver.ClientDriverRule.addExpectation()


        final ClientDriverRule driver = new ClientDriverRule()
                .expectResponsesWithin(5, TimeUnit.DAYS);
        final ClientDriverResponse response = giveResponse("", null);
       
        // When
        driver.addExpectation(
                onRequestTo("/path"),
                response);
       
        // Then
        assertThat(response.hasNotExpired(), is(true));
View Full Code Here


        // Given
        final ClientDriverRule driver = new ClientDriverRule();
        final ClientDriverResponse response = giveResponse("", null);
       
        // When
        driver.addExpectation(
                onRequestTo("/path"),
                response);
       
        // Then
        assertThat(response.canExpire(), is(false));
View Full Code Here

        final ClientDriverRule driver = new ClientDriverRule()
                .expectResponsesWithin(5, TimeUnit.MINUTES);
        final ClientDriverResponse response = giveResponse("", null);
       
        // When
        driver.addExpectation(
                onRequestTo("/path"),
                response.within(1, TimeUnit.MILLISECONDS));
       
        Thread.sleep(5);
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.