Examples of assertThat()


Examples of org.assertj.core.api.SoftAssertions.assertThat()

        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

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

            // show testing inside of ksession execution
            .test( "y.name == 'yoda'" )
            .test( "y.age == 160" )

            // test hamcrest
            .test( rf.assertThat( "y.name",
                                  matcher( "equalTo",
                                           "'yoda'" ) ) )
            .test( rf.assertThat( "y.name, equalTo('yoda')" ) )
            .test( rf.assertThat( "y.age",
                                  matcher( "equalTo",
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

            // test hamcrest
            .test( rf.assertThat( "y.name",
                                  matcher( "equalTo",
                                           "'yoda'" ) ) )
            .test( rf.assertThat( "y.name, equalTo('yoda')" ) )
            .test( rf.assertThat( "y.age",
                                  matcher( "equalTo",
                                           "160" ) ) )
            .test( rf.assertThat( "y.age, equalTo(160)" ) )
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

            // test hamcrest
            .test( rf.assertThat( "y.name",
                                  matcher( "equalTo",
                                           "'yoda'" ) ) )
            .test( rf.assertThat( "y.name, equalTo('yoda')" ) )
            .test( rf.assertThat( "y.age",
                                  matcher( "equalTo",
                                           "160" ) ) )
            .test( rf.assertThat( "y.age, equalTo(160)" ) )

            // @ FIXME commented out until hamsandwich works in the build
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

                                           "'yoda'" ) ) )
            .test( rf.assertThat( "y.name, equalTo('yoda')" ) )
            .test( rf.assertThat( "y.age",
                                  matcher( "equalTo",
                                           "160" ) ) )
            .test( rf.assertThat( "y.age, equalTo(160)" ) )

            // @ FIXME commented out until hamsandwich works in the build
            //             // test hamsandwich
            //             .test( rf.assertThat( "y", matcher( "allOf", matcher("name",  matcher( "equalTo", "'yoda'" ) ),
            //                                                          matcher("age",  matcher( "equalTo", "160" ) )
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

        // show complex testing after the ksession has finished
        .test( "y.name == 'yoda'" )
        .test( "y.age == 160" )

        // test hamcrest
        .test( rf.assertThat( "y.name",
                              matcher( "equalTo",
                                       "'yoda'" ) ) )
        .test( rf.assertThat( "y.age",
                              matcher( "equalTo",
                                       "160" ) ) )
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

        // test hamcrest
        .test( rf.assertThat( "y.name",
                              matcher( "equalTo",
                                       "'yoda'" ) ) )
        .test( rf.assertThat( "y.age",
                              matcher( "equalTo",
                                       "160" ) ) )
        .runSimulation();

        // @ FIXME commented out until hamsandwich works in the build     
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

            .end()
        .newStatefulKnowledgeSession()
             .insert( new Person( "yoda", 150 ) ).set( "y" )
             .fireAllRules()
             // show testing inside of ksession execution
             .test( rf.assertThat( "y.age", matcher( "equalTo", "120" ) ) )
             .test( rf.assertThat( "y.age, equalTo(120)" ) );       
        // @formatter:on   
       

        fail = false;
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

        .newStatefulKnowledgeSession()
             .insert( new Person( "yoda", 150 ) ).set( "y" )
             .fireAllRules()
             // show testing inside of ksession execution
             .test( rf.assertThat( "y.age", matcher( "equalTo", "120" ) ) )
             .test( rf.assertThat( "y.age, equalTo(120)" ) );       
        // @formatter:on   
       

        fail = false;
        try {
View Full Code Here

Examples of org.drools.fluent.test.impl.ReflectiveMatcherFactory.assertThat()

                // show testing inside of ksession execution
                .test( "y.name == 'yoda'" )
                .test( "y.age == 160" )

                // test hamcrest        
                .test( rf.assertThat( "y.name",
                                      matcher( "equalTo",
                                               "'yoda'" ) ) )
                .test( rf.assertThat( "y.name, equalTo('yoda')" ) )
                .test( rf.assertThat( "y.age",
                                      matcher( "equalTo",
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.