diff options
author | Tor Egge <Tor.Egge@oath.com> | 2018-11-05 16:01:07 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-11-05 16:01:07 +0000 |
commit | 1e776768473f5bd4b6502eca8b77989123e40bd6 (patch) | |
tree | 51e1d5a6488f3323386c85508a256d6f43231d8f /vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java | |
parent | 224530764a1f971673a4d4a0239928379b170cea (diff) |
Adjust command line parsing for vespa-get to handle priority names.
Diffstat (limited to 'vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java')
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java b/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java index 0a0b4290cc1..05f8964e516 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java @@ -124,6 +124,18 @@ public class CommandLineOptionsTest { } @Test + public void TestHighestPriority() { + ClientParameters params = getParsedOptions("--priority", "HIGHEST"); + assertEquals(DocumentProtocol.Priority.HIGHEST, params.priority); + } + + @Test + public void TestHigh1PriorityAsNumber() { + ClientParameters params = getParsedOptions("--priority", "2"); + assertEquals(DocumentProtocol.Priority.HIGH_1, params.priority); + } + + @Test public void testInvalidTraceLevel1() { exception.expect(IllegalArgumentException.class); exception.expectMessage("Invalid tracelevel: -1"); |