JAVA-18133 Fix drools integration tests (#13650)

Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
timis1 2023-03-22 18:12:38 +02:00 committed by GitHub
parent 1bca2d5d68
commit 59a6f32654
4 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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);
}