예제 #1
0
        public void KeyValueArgument_ShortKeyAndText_KeySpaceValueExpected()
        {
            var text = "dog and cat";
            var key  = "k";

            var argument = new KeyValueArgument(key, new StringArgument(text));

            Assert.Equal("-k \"dog and cat\"", argument.ToString());
        }
예제 #2
0
        public void KeyValueArgument_LongKeyAndNumber_KeyEqualValueExpected()
        {
            var num = 10;
            var key = "key";

            var argument = new KeyValueArgument(key, new GenericArgument <int>(num));

            Assert.Equal("--key=10", argument.ToString());
        }
예제 #3
0
        public void ArgumentTranslator_ObjectWithComplexKeyParse_NormalizedKeyValueStringExpected()
        {
            var text = "key test ";
            var num  = 5;

            var argument = new KeyValueArgument(text, new GenericArgument <int>(num));

            Assert.Equal("--key-test=5", argument.ToString());
        }