Пример #1
0
        public void TestSwitchValue()
        {
            var options = new SwitchOptionParser();
            const SwitchOptionParser.SwitchValues valueToTest = SwitchOptionParser.SwitchValues.Value2;

            options.Parse(valueToTest.ToString().ToLower());

            Assert.IsTrue(options.SwitchValue == valueToTest);
            Assert.IsTrue(options.SwitchOptionValue2.IsDefined);
            Assert.IsFalse(options.SwitchOptionValue1.IsDefined);
        }
Пример #2
0
        public void TestThatOnlyOneSwitchValueCanBeSet()
        {
            var options = new SwitchOptionParser();

            options.Parse("value1", "value2");
        }