Examples of assertThat()


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" ) ) );

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

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

                                        ResourceType.DRL )
             .end()
             .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()

             .end()
             .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()

        imports.add( "org.junit.Assert.assertThat" );
        imports.add( "org.hamcrest.CoreMatchers.is" );
        imports.add( "org.hamcrest.CoreMatchers.equalTo" );
       
        ReflectiveMatcherFactory f = new ReflectiveMatcherFactory(imports);
        ReflectiveMatcherAssert matchAssert = f.assertThat( "p.name", f.matcher( "equalTo", "'yoda'" ) );
       
        Map vars = new HashMap();
        vars.put("p", p);
       
        //matchAssert.eval(vars);
View Full Code Here

Examples of org.drools.simulation.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.simulation.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
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.