Exemplo n.º 1
0
        internal virtual void TestFiltererGood(IEnumerable <Bundle> testBundles, string argValue, IEnumerable <Bundle> expected, BundleType typeSelection, BundleArch archSelection)
        {
            var parseResult = CommandLineConfigs.UninstallRootCommand.Parse($"--{Option.Name} {argValue}");

            OptionFilterer.Filter(parseResult, Option, testBundles, typeSelection, archSelection)
            .Should().BeEquivalentTo(expected);
        }
Exemplo n.º 2
0
        internal virtual void TestFiltererException <TException>(IEnumerable <Bundle> testBundles, string argValue, BundleType typeSelection, BundleArch archSelection, string errorMessage)
            where TException : Exception
        {
            var    parseResult = CommandLineConfigs.UninstallRootCommand.Parse($"--{Option.Name} {argValue}");
            Action action      = () => OptionFilterer.Filter(parseResult, Option, testBundles, typeSelection, archSelection);

            action.Should().Throw <TException>(errorMessage);
        }