Package org.drools.base

Examples of org.drools.base.TypeResolver.addImport()


                        false));

        sc.getFixtures().addAll(facts);
        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");

        ScenarioRunner runner = new ScenarioRunner(sc,
                resolver,
                new MockWorkingMemory());
View Full Code Here


    @Test
    public void testPopulateNoData() throws Exception {
        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");
        ScenarioRunner run = new ScenarioRunner(new Scenario(),
                resolver,
                new MockWorkingMemory());
        run.getPopulatedData().clear();
        Cheese c = new Cheese();
View Full Code Here

    @Test
    public void testPopulateEmptyString() throws Exception {
        TypeResolver resolver = new ClassTypeResolver( new HashSet<String>(),
                                                       Thread.currentThread().getContextClassLoader() );
        resolver.addImport( "org.drools.Cheese" );
        ScenarioRunner run = new ScenarioRunner( new Scenario(),
                                                 resolver,
                                                 new MockWorkingMemory() );
        run.getPopulatedData().clear();
        Cheese c = new Cheese();
View Full Code Here

                ls(fd),
                false));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");
        resolver.addImport("org.drools.CheeseType");

        ScenarioRunner runner = new ScenarioRunner(new Scenario(),
                resolver,
                new MockWorkingMemory());
View Full Code Here

                false));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");
        resolver.addImport("org.drools.CheeseType");

        ScenarioRunner runner = new ScenarioRunner(new Scenario(),
                resolver,
                new MockWorkingMemory());
        Cheese f1 = new Cheese("othertype",
View Full Code Here

        sc.getFixtures().addAll(Arrays.asList(facts));
        sc.getFixtures().addAll(Arrays.asList(assertions));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");

        MockWorkingMemory wm = new MockWorkingMemory();
        ScenarioRunner runner = new ScenarioRunner(sc,
                resolver,
                wm);
View Full Code Here

                false));
        sc.getFixtures().addAll(Arrays.asList(facts));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");

        MockWorkingMemory wm = new MockWorkingMemory();
        ScenarioRunner run = new ScenarioRunner(sc,
                resolver,
                wm);
View Full Code Here

        sc.getFixtures().addAll(Arrays.asList(assertions));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("java.util.List");

        MockWorkingMemory wm = new MockWorkingMemory();
        ScenarioRunner run = new ScenarioRunner(sc,
                resolver,
                wm);
View Full Code Here

        sc.getFixtures().addAll(Arrays.asList(assertions));

        TypeResolver resolver = new ClassTypeResolver(new HashSet<String>(),
                Thread.currentThread().getContextClassLoader());
        resolver.addImport("org.drools.Cheese");
        resolver.addImport("org.drools.Person");

        WorkingMemory wm = getWorkingMemory("test_rules2.drl");

        ScenarioRunner run = new ScenarioRunner(sc,
View Full Code Here

                                                    "java" ) );

        final TypeResolver typeResolver = new ClassTypeResolver( new HashSet(),
                                                                 this.getClass().getClassLoader() );
        // make an automatic import for the current package
        typeResolver.addImport( pkgDescr.getName() + ".*" );
        typeResolver.addImport( "java.lang.*" );

        final RuleBuilder builder = new RuleBuilder();

        final PackageBuilderConfiguration conf = pkgBuilder.getPackageBuilderConfiguration();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.