-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
heo-core/src/test/java/dev/heowc/heo/core/loader/domain/ModuleLoaderVariousPathTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package dev.heowc.heo.core.loader.domain; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Path; | ||
import java.util.List; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import dev.heowc.heo.core.Module; | ||
|
||
class ModuleLoaderVariousPathTest { | ||
|
||
private final String rootDir = System.getProperty("rootDir"); | ||
|
||
@Test | ||
void absolutePath() throws IOException { | ||
final Path cycleIntergationTestProjectPath = Path.of(rootDir, "heo-core").toAbsolutePath(); | ||
|
||
final List<Module> modules = new ModuleLoader(cycleIntergationTestProjectPath.toString(), | ||
"dev.heowc.heo.core").loadModules(); | ||
|
||
assertThat(modules).hasSize(4); | ||
} | ||
|
||
@Test | ||
void relativePath() throws IOException { | ||
final Path cycleIntergationTestProjectPath = Path.of(""); | ||
|
||
final List<Module> modules = new ModuleLoader(cycleIntergationTestProjectPath.toString(), | ||
"dev.heowc.heo.core").loadModules(); | ||
|
||
assertThat(modules).hasSize(4); | ||
} | ||
} |