예제 #1
0
        public void SingleEnabledScriptStepScopedToDifferentChannel_ShouldNotBeAViablePlan()
        {
            // arrange
            var deploymentStepResource = ResourceBuilderHelpers.GetStep();

            deploymentStepResource.Actions.Add(ResourceBuilderHelpers.GetAction().WithChannel(TestHelpers.GetId("differentchannel")));
            deploymentProcessResource.Steps.Add(deploymentStepResource);

            // act
            var plan = ExecuteBuild();

            // assert
            plan.IsViableReleasePlan().Should().BeFalse();
        }
예제 #2
0
        public void SingleEnabledScriptStepScopedToMatchingChannel_ShouldBeViablePlan()
        {
            // arrange
            var deploymentStepResource = ResourceBuilderHelpers.GetStep();

            deploymentStepResource.Actions.Add(ResourceBuilderHelpers.GetAction().WithChannel(channelResource.Id));
            deploymentProcessResource.Steps.Add(deploymentStepResource);

            // act
            var plan = ExecuteBuild();

            // assert
            plan.IsViableReleasePlan().Should().BeTrue();
        }
예제 #3
0
        public void DisabledScriptSteps_ShouldNotBeAViablePlan()
        {
            // arrange
            var deploymentStepResource = ResourceBuilderHelpers.GetStep();

            deploymentStepResource.Actions.Add(ResourceBuilderHelpers.GetAction().Disabled().WithChannel(channelResource.Id));
            deploymentProcessResource.Steps.Add(deploymentStepResource);

            // act
            var plan = ExecuteBuild();

            // assert
            plan.IsViableReleasePlan().Should().BeFalse();
        }
예제 #4
0
        public void SinglePackageStep_ShouldBeViblePlan()
        {
            // arrange
            var deploymentStepResource = ResourceBuilderHelpers.GetStep();

            deploymentStepResource.Actions.Add(ResourceBuilderHelpers.GetAction().WithChannel(channelResource.Id).WithPackage());
            deploymentProcessResource.Steps.Add(deploymentStepResource);

            releaseTemplateResource.Packages.Add(GetReleaseTemplatePackage().WithPackage().WithVersion("1.0.0", versionResolver));
            channelVersionRuleTestResult.IsSatified();


            // act
            var plan = ExecuteBuild();

            // assert
            plan.IsViableReleasePlan().Should().BeTrue();
        }