Package org.drools.compiler.lang

Examples of org.drools.compiler.lang.Location


    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR7() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) and name : Cl";
        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_OR8() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) and name : Cl";
        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 ( ) and Class ( ) \n" +
            "       ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, location.getType());
        }
View Full Code Here

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

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

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

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

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

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

    public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_EXISTS() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        exists Class ( ) and exists ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS, 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.