@Test public void testCompilerMaps() throws Exception { Collection<Map<String, Object>> maps = new ArrayList<Map<String, Object>>(); final ObjectDataCompiler converter = new ObjectDataCompiler(); InputStream templateStream = this.getClass().getResourceAsStream("/templates/rule_template_1.drl"); TemplateContainer tc = new DefaultTemplateContainer(templateStream); Column[] columns = tc.getColumns(); for (String[] row : rows) { Map<String, Object> map = new HashMap<String, Object>(); for (int icol = 0; icol < columns.length; icol++) { Object value = row[icol]; if (value != null) { map.put(columns[icol].getName(), value); } } maps.add(map); } templateStream = this.getClass().getResourceAsStream("/templates/rule_template_1.drl"); final String drl = converter.compile(maps, templateStream); Assertions.assertThat(EXPECTED_RULES.toString()).isEqualToIgnoringWhitespace(drl); }
public String compile(final DataProvider dataProvider, final String template) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStream); }
DataProviderCompiler { public String compile(final DataProvider dataProvider, final String template) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStream); } }
DataProviderCompiler { public String compile(final DataProvider dataProvider, final String template) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStream); }  }
DataProviderCompiler { public String compile(final DataProvider dataProvider, final String template) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStream); }  String compile(final DataProvider dataProvider,
                          final String template); String compile(final DataProvider dataProvider,
                          final InputStream templateStream); String compile(final DataProvider dataProvider,
                          final TemplateDataListener listener); String compile(final DataProvider dataProvider,
                          final String template,
                          boolean replaceOptionals); String compile(final DataProvider dataProvider,
                          final InputStream templateStream,
                          boolean replaceOptionals); String compile(final DataProvider dataProvider,
                          final TemplateDataListener listener,
                          boolean replaceOptionals); void newCell(List<DataListener> listeners,
                        int row,
                        int column,
                        String value,
                        int mergedColStart); }
DataProviderCompiler { public String compile(final DataProvider dataProvider, final String template) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStream); }  String compile(final DataProvider dataProvider,
                          final String template); String compile(final DataProvider dataProvider,
                          final InputStream templateStream); String compile(final DataProvider dataProvider,
                          final TemplateDataListener listener); String compile(final DataProvider dataProvider,
                          final String template,
                          boolean replaceOptionals); String compile(final DataProvider dataProvider,
                          final InputStream templateStream,
                          boolean replaceOptionals); String compile(final DataProvider dataProvider,
                          final TemplateDataListener listener,
                          boolean replaceOptionals); void newCell(List<DataListener> listeners,
                        int row,
                        int column,
                        String value,
                        int mergedColStart);  }