Package org.drools.compiler.lang

Examples of org.drools.compiler.lang.Location


    public void testCheckLHSLocationDetermination_INSIDE_EVAL6() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        eval( param.getMethod().get";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_EVAL, location.getType());
        assertEquals("param.getMethod().get", location.getProperty(Location.LOCATION_EVAL_CONTENT));
        }
View Full Code Here


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

    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START3() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( name.subProperty['test'].subsu";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
        assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
        assertEquals("name.subProperty[\"test\"].subsu", location.getProperty(Location.LOCATION_PROPERTY_PROPERTY_NAME));
    }
View Full Code Here

    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START4() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( condition == true, ";
        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_START5() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( condition == true, na";
        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" +
            "        Class ( \n" +
            "            ";
        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" +
            "        Class ( condition == true, \n" +
            "            ";
        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" +
            "        Class ( c: condition, \n" +
            "            ";
        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_START9a() {
        String input =
            "rule MyRule \n" +
            "   when \n" +
            "       Class ( name:";
        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_START9b() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( name: ";
        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

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.