Package org.drools.compiler.lang

Examples of org.drools.compiler.lang.Location


    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START21() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        not Class (";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
        assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
        }
View Full Code Here


    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START22() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        not ( exists Class (";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
        assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START23() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        not ( exists name : Class (";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
        assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
        }
View Full Code Here

        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        not Class () \n" +
            "        ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR1() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) and ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR2() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) and  ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR3() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class () and   ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR4() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        name : Class ( name: property ) and ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( name: property ) \n" +
            "       and ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR6() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) and Cl";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, location.getType());
        }
View Full Code Here

TOP

Related Classes of org.drools.compiler.lang.Location

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.