Skip to content

Commit

Permalink
Merge pull request #84 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch (OSL 1.35 cut-off)
  • Loading branch information
rgdoliveira authored Nov 7, 2024
2 parents d3d9e50 + 1a8b576 commit f6153b9
Show file tree
Hide file tree
Showing 286 changed files with 4,766 additions and 4,141 deletions.
5 changes: 5 additions & 0 deletions drools-compiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@
<artifactId>drools-wiring-dynamic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.kie</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.drools.compiler;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.internal.utils.KieHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@

import org.drools.drl.ast.descr.PackageDescr;
import org.drools.io.ByteArrayResource;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.drools.util.StringUtils.generateUUID;

public class CompositePackageDescrTest {

private static final String NAMESPACE = "namespace";
private CompositePackageDescr compositePackageDescr;

@Before
@BeforeEach
public void setup() {
compositePackageDescr = new CompositePackageDescr(new ByteArrayResource(), new PackageDescr(NAMESPACE));
}
Expand All @@ -50,7 +51,7 @@ public void addPackageDescrSamePkgUUID() {
assertThat(compositePackageDescr.getPreferredPkgUUID().get()).isEqualTo(pkgUUID);
}

@Test(expected = RuntimeException.class)
@Test
public void addPackageDescrDifferentPkgUUID() {
String pkgUUID = generateUUID();
PackageDescr first = new PackageDescr(NAMESPACE);
Expand All @@ -64,6 +65,8 @@ public void addPackageDescrDifferentPkgUUID() {
second.setPreferredPkgUUID(pkgUUID);
assertThat(second.getPreferredPkgUUID().isPresent()).isTrue();
assertThat(second.getPreferredPkgUUID().get()).isNotEqualTo(first.getPreferredPkgUUID().get());
compositePackageDescr.addPackageDescr(new ByteArrayResource(), second);
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> {
compositePackageDescr.addPackageDescr(new ByteArrayResource(), second);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.dsl.PackageDescrBuilder;
import org.drools.drl.ast.dsl.impl.PackageDescrBuilderImpl;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
11 changes: 5 additions & 6 deletions drools-examples-api/default-kiesession-from-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
<groupId>org.drools</groupId>
<artifactId>drools-engine-classic</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import java.io.PrintStream;
import java.util.Arrays;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieModule;
import org.kie.api.builder.KieRepository;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class DefaultKieSessionFromByteArrayExampleTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.defaultkiesessionfromfile;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class DefaultKieSessionFromFileExampleTest {

Expand Down
11 changes: 5 additions & 6 deletions drools-examples-api/default-kiesession/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
<groupId>org.drools</groupId>
<artifactId>drools-engine-classic</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.defaultkiesession;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class DefaultKieSessionExampleTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
*/
package org.drools.example.api.defaultkiesession;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.runtime.KieSession;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;

public class DefaultKieSessionFromFSExampleTest {

private static final String NL = System.getProperty("line.separator");
Expand Down
11 changes: 5 additions & 6 deletions drools-examples-api/kie-module-from-multiple-files/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,17 @@
<artifactId>drools-engine-classic</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<!-- Needed by the example as it uses this kjar -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>kiebase-inclusion</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.kiemodulefrommultiplefiles;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class KieModuleFromMultipleFilesExampleTest {

Expand Down
10 changes: 5 additions & 5 deletions drools-examples-api/kiebase-inclusion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
<groupId>org.drools</groupId>
<artifactId>named-kiesession</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.kiebaseinclusion;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class KieBaseInclusionExampleTest {

Expand Down
11 changes: 5 additions & 6 deletions drools-examples-api/kiecontainer-from-kierepo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-engine-classic</artifactId>
Expand All @@ -49,12 +54,6 @@
<groupId>org.drools</groupId>
<artifactId>named-kiesession</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.kiecontainerfromkierepo;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class KieContainerFromKieRepoExampleTest {

Expand Down
10 changes: 5 additions & 5 deletions drools-examples-api/kiefilesystem-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.kiefilesystem;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class KieFileSystemExampleTest {

Expand Down
11 changes: 5 additions & 6 deletions drools-examples-api/kiemodulemodel-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,17 @@
<artifactId>kie-api</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<!-- Needed by the example as it uses these kjars -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>named-kiesession</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>kiebase-inclusion</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package org.drools.example.api.kiemodulemodel;

import org.junit.Test;

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.PrintStream;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

public class KieModuleModelExampleTest {

Expand Down
10 changes: 5 additions & 5 deletions drools-examples-api/multiple-kbases/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
<groupId>org.drools</groupId>
<artifactId>drools-engine-classic</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit f6153b9

Please sign in to comment.