Esempio n. 1
0
        public static void ExtractTheSameArgumentTwice_ShouldNotWork()
        {
            var args = new[] { "-a" };
            IArgumentExtractor extractor = new ArgumentExtractor(args);

            var success1 = extractor.TryExtractFlag("-a", out extractor);
            var success2 = extractor.TryExtractFlag("-a", out _);

            success1.Should().BeTrue();
            success2.Should().BeFalse();
        }
Esempio n. 2
0
        public static void ExtractingFlagArgument_ShouldWork(string flagName, string[] allArgmnets)
        {
            var extractor = new ArgumentExtractor(allArgmnets);

            var success = extractor.TryExtractFlag(flagName, out _);

            success.Should().BeTrue();
        }