diff --git a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs index 53f21c6f44..53c1ba6470 100644 --- a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs @@ -24,6 +24,7 @@ namespace chocolatey.tests.integration.scenarios using System.Linq; using System.Text; using System.Xml.XPath; + using chocolatey.infrastructure.app; using chocolatey.infrastructure.app.commands; using chocolatey.infrastructure.app.configuration; using chocolatey.infrastructure.app.services; @@ -4496,5 +4497,52 @@ public void Should_not_have_warning_package_result() Results.Should().AllSatisfy(r => r.Value.Warning.Should().BeFalse()); } } + + public class when_installing_all_packages_from_ccr : ScenariosBase + { + public override void Context() + { + base.Context(); + Configuration.PackageNames = Configuration.Input = "all"; + Configuration.Sources = ApplicationParameters.ChocolateyCommunityFeedSource; + } + + public override void Because() + { + } + + [Fact] + public void should_throw_an_error_that_it_is_not_allowed() + { + Action m = () => Service.install_run(Configuration); ; + + m.Should().Throw(); + } + } + + public class when_installing_all_packages_from_local_source : ScenariosBase + { + public override void Context() + { + base.Context(); + Configuration.PackageNames = Configuration.Input = "all"; + + Scenario.AddPackagesToSourceLocation(Configuration, "hasdependency.1.0.0*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "isdependency.1.0.0*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "isexactversiondependency*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "upgradepackage*" + NuGetConstants.PackageExtension); + } + + public override void Because() + { + Results = Service.install_run(Configuration); + } + + [Fact] + public void should_install_all_packages() + { + Results.Should().HaveCount(6); + } + } } }