Esempio n. 1
0
        public void TestDuplicateArgs()
        {
            var args   = new string[] { };
            var parsed = Args.Parse <DuplicateShortcutArgs>(args);

            Assert.AreEqual("s", ArgShortcut.GetShortcut(typeof(DuplicateShortcutArgs).GetProperty("SomeString")));
            Assert.AreEqual("so", ArgShortcut.GetShortcut(typeof(DuplicateShortcutArgs).GetProperty("SomeOtherString")));
        }
Esempio n. 2
0
        public void TestDuplicateArgsEdge()
        {
            var args   = new string[] { };
            var parsed = Args.Parse <DuplicateShortcutEdgeCaseArgs>(args);

            Assert.AreEqual("ab", ArgShortcut.GetShortcut(typeof(DuplicateShortcutEdgeCaseArgs).GetProperty("Abcdefg0")));
            Assert.AreEqual("a", ArgShortcut.GetShortcut(typeof(DuplicateShortcutEdgeCaseArgs).GetProperty("Abcdefg1")));
            Assert.AreEqual("abc", ArgShortcut.GetShortcut(typeof(DuplicateShortcutEdgeCaseArgs).GetProperty("Abcdefg2")));
            Assert.AreEqual("abcd", ArgShortcut.GetShortcut(typeof(DuplicateShortcutEdgeCaseArgs).GetProperty("Abcdefg3")));
        }