Package com.jayway.awaitility.classes

Examples of com.jayway.awaitility.classes.Asynch


    }

    @Test(timeout = 2000)
    public void usingAtomicInteger() throws Exception {
        AtomicInteger atomic = new AtomicInteger(0);
        new Asynch(new FakeRepositoryWithAtomicInteger(atomic)).perform();
    await().untilAtomic(atomic, equalTo(1));
    }
View Full Code Here


    }

    @Test(timeout = 2000)
    public void usingAtomicBoolean() throws Exception {
        AtomicBoolean atomic = new AtomicBoolean(false);
        new Asynch(new FakeRepositoryWithAtomicBoolean(atomic)).perform();
    await().untilAtomic(atomic, equalTo(true));
    }
View Full Code Here

    }

    @Test(timeout = 2000)
    public void usingAtomicLong() throws Exception {
        AtomicLong atomic = new AtomicLong(0);
        new Asynch(new FakeRepositoryWithAtomicLong(atomic)).perform();
    await().untilAtomic(atomic, equalTo(1L));
    }
View Full Code Here

    }

    @Test(timeout = 2000)
    public void usingAtomicReference() throws Exception {
        AtomicReference<String> atomic = new AtomicReference<String>("0");
        new Asynch(new FakeRepositoryWithAtomicReference(atomic)).perform();
    await().untilAtomic(atomic, equalTo("1"));
    }
View Full Code Here

        Awaitility.reset();
    }

    @Test(timeout = 2000)
    public void returnsResultAfterProxyCall() throws Exception {
        new Asynch(fakeRepository).perform();
        int value = await().untilCall(to(fakeRepository).getValue(), greaterThan(0));
        assertEquals(1, value);
    }
View Full Code Here

        assertEquals(1, value);
    }

    @Test(timeout = 2000)
    public void returnsResultAfterSupplier() throws Exception {
        new Asynch(fakeRepository).perform();
        int value = await().until(new Callable<Integer>() {
            public Integer call() throws Exception {
                return fakeRepository.getValue();
            }
        }, greaterThan(0));
View Full Code Here

        assertEquals(1, value);
    }

    @Test(timeout = 2000)
    public void returnsResultAfterFieldInSupplier() throws Exception {
        new Asynch(fakeRepository).perform();
        int value = await().until(fieldIn(fakeRepository).ofType(int.class).andWithName("value"), equalTo(1));
        assertEquals(1, value);
    }
View Full Code Here

        Awaitility.reset();
    }

    @Test(timeout = 2000)
    public void awaitAssertJAssertionAsLambda() {
        new Asynch(fakeRepository).perform();
        await().until(() -> Assertions.assertThat(fakeRepository.getValue()).isEqualTo(1));
    }
View Full Code Here

        await().until(() -> Assertions.assertThat(fakeRepository.getValue()).isEqualTo(1));
    }

    @Test(timeout = 2000)
    public void awaitUsingLambdaVersionOfCallableBoolean() {
        new Asynch(fakeRepository).perform();
        await().until(() -> fakeRepository.getValue() == 1);
    }
View Full Code Here

    }

    @SuppressWarnings("Convert2Lambda")
    @Test(timeout = 2000)
    public void awaitAssertJAssertionAsAnonymousClass() {
        new Asynch(fakeRepository).perform();
        await().until(new Runnable() {
            @Override
            public void run() {
                Assertions.assertThat(fakeRepository.getValue()).isEqualTo(1);
            }
View Full Code Here

TOP

Related Classes of com.jayway.awaitility.classes.Asynch

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.