Skip to content

Commit

Permalink
Add test for the advanced options group
Browse files Browse the repository at this point in the history
  • Loading branch information
olmokramer committed Sep 14, 2023
1 parent d1db0e9 commit 36dae0f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cli/src/test/java/de/jplag/cli/AdvancedGroupTest.java
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());
}
}

0 comments on commit 36dae0f

Please sign in to comment.