Package org.drools.core.reteoo

Examples of org.drools.core.reteoo.ObjectTypeNode.assertObject()


        final Object string1 = "cheese";

        final InternalFactHandle handle1 = (InternalFactHandle) workingMemory.insert(string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        // make sure just string1 was asserted
        final List asserted = sink.getAsserted();
View Full Code Here


        final Object string1 = "cheese";

        final InternalFactHandle handle1 = (InternalFactHandle) workingMemory.insert(string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        // make sure just string1 was asserted
        final List asserted = sink.getAsserted();
View Full Code Here

        final DefaultFactHandle handle1 = new DefaultFactHandle(1,
                                                                string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);
        // check asserted object was added to memory
        final ObjectTypeNodeMemory memory = (ObjectTypeNodeMemory) workingMemory.getNodeMemory(objectTypeNode);
        assertEquals(1,
View Full Code Here

        final DefaultFactHandle handle1 = new DefaultFactHandle(1,
                                                                string1);
        final DefaultFactHandle handle2 = new DefaultFactHandle(2,
                                                                string2);

        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        objectTypeNode.assertObject(handle2,
                                    context,
View Full Code Here

        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        objectTypeNode.assertObject(handle2,
                                    context,
                                    workingMemory);

        assertEquals(2,
                     sink1.getAsserted().size());
View Full Code Here

        final Object string3 = "water";

        final DefaultFactHandle handle3 = new DefaultFactHandle(3,
                                                                string3);

        objectTypeNode.assertObject(handle3,
                                    context,
                                    workingMemory);

        assertEquals(3,
                     sink1.getAsserted().size());
View Full Code Here

                                         25);

        final InternalFactHandle handle1 = (InternalFactHandle) workingMemory.insert(person);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        // make sure just string1 was asserted
        final List asserted = sink.getAsserted();
View Full Code Here

        final Object string1 = "cheese";

        final InternalFactHandle handle1 = (InternalFactHandle) ksession.insert(string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    ksession);

        // make sure just string1 was asserted
        final List asserted = sink.getAsserted();
View Full Code Here

        final Object string1 = "cheese";

        final InternalFactHandle handle1 = (InternalFactHandle) workingMemory.insert(string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    workingMemory);

        // make sure just string1 was asserted
        final List asserted = sink.getAsserted();
View Full Code Here

        final DefaultFactHandle handle1 = new DefaultFactHandle(1,
                                                                string1);

        // should assert as ObjectType matches
        objectTypeNode.assertObject(handle1,
                                    context,
                                    ksession);
        // check asserted object was added to memory
        final ObjectTypeNodeMemory memory = (ObjectTypeNodeMemory) ksession.getNodeMemory(objectTypeNode);
        assertEquals(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.