Esempio n. 1
0
        public void NotPresentSimpleSwitch()
        {
            Parser <bool> lightsAreOnParser = new Switch("lights");

            bool turnLightsOn = lightsAreOnParser.AssumeGoodParse(/* no arguments!*/);

            Console.WriteLine($"lights should be on: {turnLightsOn}");
            turnLightsOn.Should().BeFalse(); /* hide */
        }
Esempio n. 2
0
        public void PresentShortSwitch()
        {
            Parser <bool> lightsAreOnParser = new Switch("lights", 'l');

            bool turnLightsOn = lightsAreOnParser.AssumeGoodParse("-l");

            Console.WriteLine($"lights should be on: {turnLightsOn}");
            turnLightsOn.Should().BeTrue(); /* hide */
        }