當前位置: 首頁>>代碼示例>>C#>>正文


C# CommandLineParser.ExtractAndValidateArguments方法代碼示例

本文整理匯總了C#中OpenCover.Framework.CommandLineParser.ExtractAndValidateArguments方法的典型用法代碼示例。如果您正苦於以下問題:C# CommandLineParser.ExtractAndValidateArguments方法的具體用法?C# CommandLineParser.ExtractAndValidateArguments怎麽用?C# CommandLineParser.ExtractAndValidateArguments使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenCover.Framework.CommandLineParser的用法示例。


在下文中一共展示了CommandLineParser.ExtractAndValidateArguments方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ExtractsHideSkipped_DefaultsToAll

        public void ExtractsHideSkipped_DefaultsToAll()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-hideskipped", RequiredArgs });

            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual(5, parser.HideSkipped.Distinct().Count());
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:10,代碼來源:CommandLineParserTests.cs

示例2: HandlesReturnTargetCodeArgument

        public void HandlesReturnTargetCodeArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-returntargetcode", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.ReturnTargetCode);
        }
開發者ID:mtscout6,項目名稱:opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例3: HandlesNoDefaultFiltersArgument

        public void HandlesNoDefaultFiltersArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[]{"-nodefaultfilters" , RequiredArgs});

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.NoDefaultFilters);
        }
開發者ID:mtscout6,項目名稱:opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例4: HandlesMergeByHashArgument

        public void HandlesMergeByHashArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-mergebyhash", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.MergeByHash);
        }
開發者ID:mtscout6,項目名稱:opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例5: HandlesFilterArgument

        public void HandlesFilterArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[]{"-filter:XYZ ABC", RequiredArgs});

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual(2, parser.Filters.Count);
        }
開發者ID:mtscout6,項目名稱:opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例6: DetectsServiceArgument

        public void DetectsServiceArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-service", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.Service);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例7: Detects_EnablePerformanceCounters_Argument

        public void Detects_EnablePerformanceCounters_Argument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-enableperformancecounters", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.EnablePerformanceCounters);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例8: DetectsOldStyleArgument

        public void DetectsOldStyleArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-oldstyle", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.OldStyleInstrumentation);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例9: HandlesTheRegisterArgumentWithUserValue

        public void HandlesTheRegisterArgumentWithUserValue()
        {
            // arrange  
            var parser = new CommandLineParser(new[]{"-register:User" , RequiredArgs});

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.Register);
            Assert.AreEqual(Registration.User, parser.Registration);
        }
開發者ID:AtwooTM,項目名稱:opencover,代碼行數:12,代碼來源:CommandLineParserTests.cs

示例10: HandlesExcludeByAttributeArgument_WithMultipleValues

        public void HandlesExcludeByAttributeArgument_WithMultipleValues()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-excludebyattribute:wibble;wobble;woop", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual(3, parser.AttributeExclusionFilters.Count);
            Assert.AreEqual("wibble", parser.AttributeExclusionFilters[0]);
            Assert.AreEqual("wobble", parser.AttributeExclusionFilters[1]);
            Assert.AreEqual("woop", parser.AttributeExclusionFilters[2]);
        }
開發者ID:tomstaijen,項目名稱:opencover,代碼行數:14,代碼來源:CommandLineParserTests.cs

示例11: HandlesCoverByTestArgument_WithMultipleValues

        public void HandlesCoverByTestArgument_WithMultipleValues()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-coverbytest:wibble;wobble;woop", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual(3, parser.TestFilters.Count);
            Assert.AreEqual("wibble", parser.TestFilters[0]);
            Assert.AreEqual("wobble", parser.TestFilters[1]);
            Assert.AreEqual("woop", parser.TestFilters[2]);
        }
開發者ID:tomstaijen,項目名稱:opencover,代碼行數:14,代碼來源:CommandLineParserTests.cs

示例12: ExtractsHideSkipped_Handles_Multiple_Arg

        public void ExtractsHideSkipped_Handles_Multiple_Arg()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-hideskipped:File;Filter;MissingPdb;Attribute", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual(4, parser.HideSkipped.Distinct().Count());
            Assert.AreEqual(SkippedMethod.File, parser.HideSkipped[0]);
            Assert.AreEqual(SkippedMethod.Filter, parser.HideSkipped[1]);
            Assert.AreEqual(SkippedMethod.MissingPdb, parser.HideSkipped[2]);
            Assert.AreEqual(SkippedMethod.Attribute, parser.HideSkipped[3]);
        }
開發者ID:dpvreony-forks,項目名稱:opencover,代碼行數:15,代碼來源:CommandLineParserTests.cs

示例13: HandlesTheOutputArgumentWithSuppliedValueWithMultipleTimes

        public void HandlesTheOutputArgumentWithSuppliedValueWithMultipleTimes()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-output:ZYX", "-output:XYZ", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.AreEqual("ZYX XYZ", parser.OutputFile);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例14: HandlesShowUnvisitedArgument

        public void HandlesShowUnvisitedArgument()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-showunvisited", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.ShowUnvisited);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:11,代碼來源:CommandLineParserTests.cs

示例15: HandlesReturnTargetCodeArgument_WithValue

        public void HandlesReturnTargetCodeArgument_WithValue()
        {
            // arrange
            var parser = new CommandLineParser(new[] { "-returntargetcode:100", RequiredArgs });

            // act
            parser.ExtractAndValidateArguments();

            // assert
            Assert.IsTrue(parser.ReturnTargetCode);
            Assert.AreEqual(100, parser.ReturnCodeOffset);
        }
開發者ID:nagyist,項目名稱:sawilde-opencover,代碼行數:12,代碼來源:CommandLineParserTests.cs


注:本文中的OpenCover.Framework.CommandLineParser.ExtractAndValidateArguments方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。