Package org.drools.lang.dsl

Examples of org.drools.lang.dsl.DSLMappingEntry$AnySection


        SuggestionCompletionLoader suggestionCompletionLoader = new SuggestionCompletionLoader();
        ArrayList<DSLTokenizedMappingFile> dsls = new ArrayList<DSLTokenizedMappingFile>();

        DSLTokenizedMappingFile dslTokenizedMappingFile = new DSLTokenizedMappingFile();

        DSLMappingEntry dslMappingEntry = mock( DSLMappingEntry.class );
        when( dslMappingEntry.getSection() ).thenReturn( DSLMappingEntry.ANY );

        dslTokenizedMappingFile.getMapping().addEntry( dslMappingEntry );
        dsls.add( dslTokenizedMappingFile );

        SuggestionCompletionEngine suggestionEngine = suggestionCompletionLoader.getSuggestionEngine( "",
View Full Code Here


    }

    @Test
    public void testAddSentenceMultipleTypes() {
        final DSLMappingEntry mapping1 = mock(DSLMappingEntry.class, "mapping1");
        final DSLMappingEntry mapping2 = mock(DSLMappingEntry.class, "mapping2");
        final DSLMappingEntry mapping3 = mock(DSLMappingEntry.class, "mapping3");
        final DSLMappingEntry mapping4 = mock(DSLMappingEntry.class, "mapping4");
       
       
        // setting expectations for entry1
        when(mapping1.getSection()).thenReturn(DSLMappingEntry.CONDITION );
        when(mapping1.getMappingKey()).thenReturn("cond");
       
        // setting expectations for entry2
        when(mapping2.getSection()).thenReturn(DSLMappingEntry.CONSEQUENCE );
        when(mapping2.getMappingKey()).thenReturn("cons");

        // setting expectations for entry3
        when(mapping3.getSection()).thenReturn(DSLMappingEntry.ANY );
        when(mapping3.getMappingKey()).thenReturn("any");
       
        // setting expectations for entry4
        when(mapping4.getSection()).thenReturn(DSLMappingEntry.KEYWORD );
        when(mapping4.getMappingKey()).thenReturn("key");
       
        this.builder.addDSLMapping(mapping1);
        this.builder.addDSLMapping(mapping2);
        this.builder.addDSLMapping(mapping3);
        this.builder.addDSLMapping(mapping4);
View Full Code Here

        SuggestionCompletionLoader suggestionCompletionLoader = new SuggestionCompletionLoader();
        ArrayList<DSLTokenizedMappingFile> dsls = new ArrayList<DSLTokenizedMappingFile>();

        DSLTokenizedMappingFile dslTokenizedMappingFile = new DSLTokenizedMappingFile();

        DSLMappingEntry dslMappingEntry = mock( DSLMappingEntry.class );
        when( dslMappingEntry.getSection() ).thenReturn( DSLMappingEntry.ANY );

        dslTokenizedMappingFile.getMapping().addEntry( dslMappingEntry );
        dsls.add( dslTokenizedMappingFile );

        SuggestionCompletionEngine suggestionEngine = suggestionCompletionLoader.getSuggestionEngine( "",
View Full Code Here

TOP

Related Classes of org.drools.lang.dsl.DSLMappingEntry$AnySection

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.