-
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.
EnvParser Initial Implementation, JavaDoc and Unit Test Start
- Loading branch information
rikkarth
committed
Dec 5, 2023
1 parent
4680a41
commit 5305d1b
Showing
5 changed files
with
70 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,4 @@ build/ | |
dependency-reduced-pom.xml | ||
pom.xml.versionsBackup | ||
javadoc | ||
/release.properties |
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
35 changes: 31 additions & 4 deletions
35
...olertools/pathfinder/SystemEnvParser.java → ...toolertools/pathfinder/EnvPathParser.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
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
27 changes: 27 additions & 0 deletions
27
src/test/java/pt/codeforge/toolertools/pathfinder/EnvPathParserTest.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,27 @@ | ||
package pt.codeforge.toolertools.pathfinder; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.ValueSource; | ||
|
||
class EnvPathParserTest { | ||
|
||
@BeforeEach | ||
void setup(){ | ||
System.setProperty("$HOME", "test"); | ||
} | ||
|
||
@ParameterizedTest | ||
@ValueSource(strings = "$HOMEDRIVE/$HOMEPATH") | ||
void testGetEnvPath(String input){ | ||
|
||
System.out.println(EnvPathParser.getEnvPath(input)); | ||
} | ||
|
||
@Test | ||
void testBadGetEnvPath(){ | ||
System.out.println(EnvPathParser.getEnvPath(null)); | ||
} | ||
|
||
} |