Examples of ExceptionThrowingAsynch


Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    @Test(timeout = 2000, expected = IllegalStateException.class)
    public void uncaughtExceptionsArePropagatedToAwaitingThreadAndBreaksForeverBlockWhenSetToCatchAllUncaughtExceptions()
            throws Exception {
        catchUncaughtExceptionsByDefault();
        new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
        await().forever().until(value(), equalTo(1));
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

        await().forever().until(value(), equalTo(1));
    }

    @Test(timeout = 2000, expected = ComparisonFailure.class)
    public void uncaughtThrowablesArePropagatedToAwaitingThreadAndBreaksForeverBlockWhenSetToCatchAllUncaughtExceptions() {
        new ExceptionThrowingAsynch(new ComparisonFailure("Message", "Something", "Something else")).perform();
        await().forever().until(value(), equalTo(1));
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    }

    @Test(timeout = 2000, expected = IllegalStateException.class)
    public void uncaughtExceptionsArePropagatedToAwaitingThreadAndBreaksForeverBlockWhenCatchingAllUncaughtExceptions()
            throws Exception {
        new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
        catchUncaughtExceptions().and().await().forever().until(value(), equalTo(1));
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    @Test(timeout = 2000, expected = ConditionTimeoutException.class)
    public void whenDontCatchUncaughtExceptionsIsSpecifiedThenExceptionsFromOtherThreadsAreNotCaught() throws Exception {
        new AssertExceptionThrownInAnotherThreadButNeverCaughtByAnyThreadTest() {
            @Override
            public void testLogic() throws Exception {
                new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
                dontCatchUncaughtExceptions().and().await().atMost(ONE_SECOND).until(value(), equalTo(1));
            }
        };
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    public void whenDontCatchUncaughtExceptionsIsSpecifiedAndTheBuildOfTheAwaitStatementHasStartedThenExceptionsFromOtherThreadsAreNotCaught()
            throws Exception {
        new AssertExceptionThrownInAnotherThreadButNeverCaughtByAnyThreadTest() {
            @Override
            public void testLogic() throws Exception {
                new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
                await().and().dontCatchUncaughtExceptions().given().timeout(ONE_SECOND).until(value(), equalTo(1));
            }
        };
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    @Test(timeout = 2000, expected = ConditionTimeoutException.class)
    public void catchUncaughtExceptionsIsReset() throws Exception {
        new AssertExceptionThrownInAnotherThreadButNeverCaughtByAnyThreadTest() {
            @Override
            public void testLogic() throws Exception {
                new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
                dontCatchUncaughtExceptions().and().await().atMost(Duration.ONE_SECOND).until(value(), equalTo(1));
            }
        };
    }
View Full Code Here

Examples of com.jayway.awaitility.core.ExceptionThrowingAsynch

    public void waitAtMostWorks() throws Exception {
        new AssertExceptionThrownInAnotherThreadButNeverCaughtByAnyThreadTest() {

            @Override
            public void testLogic() throws Exception {
                new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
                dontCatchUncaughtExceptions().and().given().pollInterval(Duration.ONE_HUNDRED_MILLISECONDS).then().await().atMost(ONE_SECOND)
                        .untilCall(to(fakeRepository).getValue(), equalTo(1));
                waitAtMost(ONE_SECOND).and().dontCatchUncaughtExceptions().untilCall(to(fakeRepository).getValue(), equalTo(1));
                dontCatchUncaughtExceptions().and().await().atMost(ONE_SECOND).untilCall(to(fakeRepository).getValue(), equalTo(1));
                dontCatchUncaughtExceptions().and().await().untilCall(to(fakeRepository).getValue(), equalTo(1));
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.