Package org.assertj.core.api

Examples of org.assertj.core.api.SoftAssertions


                new CountingLatch(maxConcurrent, "execs finished");

        submitTasks(numOfThreads,
                execsStarted, expectedRejects, execsFinished,
                testName);
        SoftAssertions softly = new SoftAssertions();
        // last requests which exceed the limit will fail to get permit
        expectedRejects.awaitAndVerify(softly);
        // requests that are within the max concurrent limit should get permit
        execsStarted.awaitAndVerify(softly);
        // accepted jobs should eventually finish
        awakenBlockedRunnables();
        execsFinished.awaitAndVerify(softly);
        softly.assertAll();
    }
View Full Code Here


                new CountingLatch(numTasks, "execs finished");
        submitTasks(numTasks,
            execsStarted, expectedRejects, execsFinished,
            testName);

        SoftAssertions softly = new SoftAssertions();
        execsStarted.awaitAndVerify(softly);
        expectedBlocks.awaitAndVerify(softly);
        expectedRejects.awaitAndVerify(softly);
        execsFinished.assertEquals(softly, 0);
        softly.assertThat(blockCountingSemaphore.numOfBlockedThreads()).as("blocked threads").isEqualTo(
            expectedBlocksNum);
        softly.assertAll();
        awakenBlockedRunnables();
        execsFinished.awaitAndVerify();
    }
View Full Code Here

TOP

Related Classes of org.assertj.core.api.SoftAssertions

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.