Skip to content

Commit

Permalink
Minor Test Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkarth committed Dec 5, 2023
1 parent 5305d1b commit 8a3a097
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pt.codeforge.toolertools.pathfinder;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -8,20 +9,20 @@
class EnvPathParserTest {

@BeforeEach
void setup(){
void setup() {
System.setProperty("$HOME", "test");
}

@ParameterizedTest
@ValueSource(strings = "$HOMEDRIVE/$HOMEPATH")
void testGetEnvPath(String input){
void testGetEnvPath(String input) {

System.out.println(EnvPathParser.getEnvPath(input));
}

@Test
void testBadGetEnvPath(){
System.out.println(EnvPathParser.getEnvPath(null));
void testBadGetEnvPath() {
Assertions.assertThrows(IllegalArgumentException.class, () -> EnvPathParser.getEnvPath(null));
}

}

0 comments on commit 8a3a097

Please sign in to comment.