JAVA-18133 Fix drools integration tests (#13650)
Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
parent
1bca2d5d68
commit
59a6f32654
|
@ -20,7 +20,7 @@ public class DroolsBeanFactory {
|
|||
|
||||
private KieFileSystem getKieFileSystem() {
|
||||
KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
|
||||
List<String> rules = Arrays.asList("BackwardChaining.drl", "SuggestApplicant.drl", "Product_rules.xls");
|
||||
List<String> rules = Arrays.asList("BackwardChaining.drl", "SuggestApplicant.drl", "Product_rules.drl.xls");
|
||||
for(String rule:rules) {
|
||||
kieFileSystem.write(ResourceFactory.newClassPathResource(rule));
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class DroolsBeanFactory {
|
|||
|
||||
kieFileSystem.write(ResourceFactory.newClassPathResource("com/baeldung/drools/rules/BackwardChaining.drl"));
|
||||
kieFileSystem.write(ResourceFactory.newClassPathResource("com/baeldung/drools/rules/SuggestApplicant.drl"));
|
||||
kieFileSystem.write(ResourceFactory.newClassPathResource("com/baeldung/drools/rules/Product_rules.xls"));
|
||||
kieFileSystem.write(ResourceFactory.newClassPathResource("com/baeldung/drools/rules/Product_rules.drl.xls"));
|
||||
|
||||
KieBuilder kb = kieServices.newKieBuilder(kieFileSystem);
|
||||
kb.buildAll();
|
||||
|
@ -83,7 +83,7 @@ public class DroolsBeanFactory {
|
|||
|
||||
/*
|
||||
* Can be used for debugging
|
||||
* Input excelFile example: com/baeldung/drools/rules/Discount.xls
|
||||
* Input excelFile example: com/baeldung/drools/rules/Discount.drl.xls
|
||||
*/
|
||||
public String getDrlFromExcel(String excelFile) {
|
||||
DecisionTableConfiguration configuration = KnowledgeBuilderFactory.newDecisionTableConfiguration();
|
||||
|
|
|
@ -18,7 +18,7 @@ public class DiscountExcelIntegrationTest {
|
|||
|
||||
@Before
|
||||
public void setup() {
|
||||
Resource resource = ResourceFactory.newClassPathResource("com/baeldung/drools/rules/Discount.xls", getClass());
|
||||
Resource resource = ResourceFactory.newClassPathResource("com/baeldung/drools/rules/Discount.drl.xls", getClass());
|
||||
kSession = new DroolsBeanFactory().getKieSession(resource);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue