-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for the advanced options group
- Loading branch information
1 parent
d1db0e9
commit 36dae0f
Showing
1 changed file
with
23 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package de.jplag.cli; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.util.Arrays; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class AdvancedGroupTest extends CommandLineInterfaceTest { | ||
private static final String SUFFIXES = ".sc,.scala"; | ||
|
||
private static final double SIMILARITY_THRESHOLD = 0.5; | ||
|
||
/** | ||
* Verify that it is possible to set multiple options in the "advanced" options group. | ||
*/ | ||
@Test | ||
void testNotExclusive() throws CliException { | ||
buildOptionsFromCLI(defaultArguments().suffixes(SUFFIXES).similarityThreshold(SIMILARITY_THRESHOLD)); | ||
assertEquals(Arrays.stream(SUFFIXES.split(",")).toList(), options.fileSuffixes()); | ||
assertEquals(0.5, options.similarityThreshold()); | ||
} | ||
} |