-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration for plugins to avoid use of deprecated raw arguments.
- Loading branch information
1 parent
b2b207e
commit 075c6a2
Showing
3 changed files
with
71 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import java.util.Arrays; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Lennart Jörelid</a> | ||
*/ | ||
|
@@ -86,4 +88,24 @@ public void validateMixedArguments() { | |
Assert.assertEquals("value1", result[1]); | ||
Assert.assertEquals("-flag2", result[2]); | ||
} | ||
|
||
@Test | ||
public void validatePrefixedArgument() { | ||
|
||
// Assemble | ||
final ArgumentBuilder unitUnderTest = new ArgumentBuilder(); | ||
|
||
// Act | ||
final String[] result = unitUnderTest | ||
.withPrefixedArguments("X", Arrays.asList("plugin1", "plugin2")) | ||
.withPrefixedArguments("X", Arrays.asList("plugin3", "plugin4")) | ||
.build(); | ||
|
||
// Assert | ||
Assert.assertEquals(4, result.length); | ||
Assert.assertEquals("-Xplugin1", result[0]); | ||
Assert.assertEquals("-Xplugin2", result[1]); | ||
Assert.assertEquals("-Xplugin3", result[2]); | ||
Assert.assertEquals("-Xplugin4", result[3]); | ||
} | ||
} |