gitgabrio commented on code in PR #3471:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3471#discussion_r1560502881
##########
quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common-deployment/src/test/java/org/kie/kogito/quarkus/common/deployment/KogitoAssetsProcessorTest.java:
##########
@@ -18,48 +18,49 @@
*/
package org.kie.kogito.quarkus.common.deployment;
-import java.io.File;
-import java.nio.file.Path;
-import java.util.Arrays;
-
-import org.junit.jupiter.api.Test;
-
-import io.quarkus.bootstrap.model.PathsCollection;
-import io.quarkus.paths.PathCollection;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
class KogitoAssetsProcessorTest {
- @Test
- void getRootPathsWithoutClasses() {
- String projectDirPath = "projectDir";
- String outputTargetPath = "outputTarget";
- Path projectDir = Path.of(projectDirPath);
- Path outputTarget = Path.of(outputTargetPath);
- Iterable<Path> paths = Arrays.asList(projectDir, outputTarget);
-
- PathCollection resolvedPaths = PathsCollection.from(paths);
- PathCollection retrieved =
KogitoAssetsProcessor.getRootPaths(resolvedPaths);
- assertEquals(resolvedPaths.size(), retrieved.size());
- paths.forEach(expected -> assertTrue(retrieved.contains(expected)));
- }
-
- @Test
- void getRootPathsWithClasses() {
- String projectDirPath = "projectDir";
- String outputTargetPath = "outputTarget";
- String outputTargetPathClasses = String.format("%s/%s/classes",
projectDirPath, outputTargetPath).replace("/", File.separator);
- Path projectDir = Path.of(projectDirPath);
- Path outputTarget = Path.of(outputTargetPathClasses);
- Iterable<Path> paths = Arrays.asList(projectDir, outputTarget);
-
- PathCollection resolvedPaths = PathsCollection.from(paths);
- PathCollection retrieved =
KogitoAssetsProcessor.getRootPaths(resolvedPaths);
- assertEquals(resolvedPaths.size() + 1, retrieved.size());
- paths.forEach(expected -> assertTrue(retrieved.contains(expected)));
- String expectedPath = String.format("%s/%s/generated-resources",
projectDirPath, outputTargetPath).replace("/", File.separator);
- assertTrue(retrieved.contains(Path.of(expectedPath)));
- }
+ // @ParameterizedTest
Review Comment:
Yes, still working on that.
My plan is to extend test coverage to the places I modified (where possible)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]