Package org.drools.compiler.lang

Examples of org.drools.compiler.lang.Location


    public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START40() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) or 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_OPERATOR() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) or 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_ARGUMENT30() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        Class ( ) or Class ( name == ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT, location.getType());
        }
View Full Code Here

    public void testCheckLHSLocationDetermination_EGIN_OF_CONDITION_NOT() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        exists Class ( ) or 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_EXISTS40() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        exists Class ( ) or exists ";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS, location.getType());
        }
View Full Code Here

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

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

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

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

    public void testCheckLHSLocationDetermination_INSIDE_EVAL5() {
        String input =
            "rule MyRule \n" +
            "    when \n" +
            "        eval( param.getMethod(";
        Location location = new CompletionContext(input).getLocation();
        assertEquals(Location.LOCATION_LHS_INSIDE_EVAL, location.getType());
        assertEquals("param.getMethod(", location.getProperty(Location.LOCATION_EVAL_CONTENT));
        }
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.