Package org.drools.workbench.models.datamodel.oracle

Examples of org.drools.workbench.models.datamodel.oracle.PackageDataModelOracle


        String expected = "rule \"test sub constraints\""
                + "\tdialect \"mvel\"\n when "
                + "     Person(field1.field2 == variableHere)" + " then "
                + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "field1",
View Full Code Here


                + "Goober( gooField == \"gooValue\" || fooField != null || fooField.barField == \"barValue\" )\n"
                + "then\n"
                + "insert( new Whee() );\n"
                + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Goober", new ModelField[]{
                            new ModelField(
                                    "gooField",
View Full Code Here

                + "Goober( gooField == \"gooValue\" || fooField != null || fooField.barField == \"barValue\", zooField == \"zooValue\" )\n"
                + "then\n"
                + "insert( new Whee() );\n"
                + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Goober", new ModelField[]{
                            new ModelField(
                                    "gooField",
View Full Code Here

                + "Goober( gooField == \"gooValue\" && fooField != null && fooField.barField == \"barValue\" )\n"
                + "then\n"
                + "insert( new Whee() );\n"
                + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Goober", new ModelField[]{
                            new ModelField(
                                    "gooField",
View Full Code Here

                + "Goober( gooField == \"gooValue\" && fooField != null && fooField.barField == \"barValue\", zooField == \"zooValue\" )\n"
                + "then\n"
                + "insert( new Whee() );\n"
                + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Goober", new ModelField[]{
                            new ModelField(
                                    "gooField",
View Full Code Here

                "dialect \"mvel\"" +
                "when\n" +
                "then\n" +
                "end\n";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        final RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl, dmo );
        assertNotNull( m );

        assertEquals( 1,
                      m.getImports().getImports().size() );
View Full Code Here

                "$a : Applicant( )\n" +
                "then\n" +
                "$a.setName( \"Michael\" );\n" +
                "end\n";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        final RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl, dmo );
        assertNotNull( m );

        //LHS
        assertEquals( 1,
View Full Code Here

                "$a : Applicant( )\n" +
                "then\n" +
                "$a.addName( \"Michael\" );\n" +
                "end\n";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        final RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl, dmo );
        assertNotNull( m );

        //LHS
        assertEquals( 1,
View Full Code Here

                "Here's something typed by the user as free-format DRL\n" +
                "$b : Bananna( )\n" +
                "then\n" +
                "end\n";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        final RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl, dmo );
        assertNotNull( m );

        //LHS
        assertEquals( 3,
View Full Code Here

                "$a.setName( \"Michael\" );\n" +
                "Here's something typed by the user as free-format DRL\n" +
                "$a.setAge( 40 );\n" +
                "end\n";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        final RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl, dmo );
        assertNotNull( m );

        //LHS
        assertEquals( 1,
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.oracle.PackageDataModelOracle

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.