Package com.github.restdriver.serverdriver.polling

Examples of com.github.restdriver.serverdriver.polling.Poller


        driver.addExpectation(new ClientDriverRequest("/"), new ClientDriverResponse("NOW!", "text/plain"));
    }
   
    @Test
    public void pollerReturnsSuccessEventually() {
        new Poller() {
            @Override
            public void poll() {
                loudly();
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
View Full Code Here


   
    @Test
    public void pollerTriesCorrectNumberOfTimes() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

   
    @Test
    public void pollerTriesCorrectNumberOfTimesWithDurationSpecified() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2), every(100, TimeUnit.MILLISECONDS)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

        driver.addExpectation(new ClientDriverRequest("/"), new ClientDriverResponse("NOW!", "text/plain"));
    }
   
    @Test
    public void pollerReturnsSuccessEventually() {
        new Poller() {
            @Override
            public void poll() {
                loudly();
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
View Full Code Here

   
    @Test
    public void pollerTriesCorrectNumberOfTimes() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

   
    @Test
    public void pollerTriesCorrectNumberOfTimesWithDurationSpecified() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2), every(100, TimeUnit.MILLISECONDS)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

TOP

Related Classes of com.github.restdriver.serverdriver.polling.Poller

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.