示例#1
0
        public void ShouldDeleteOverrideForEnvironment()
        {
            CommandLineArgs.Add("-project=OctoFx");
            CommandLineArgs.Add("-environment=Production");

            project.AutoDeployReleaseOverrides.Add(new AutoDeployReleaseOverrideResource(environment.Id, release.Id));

            deleteAutoDeployOverrideCommand.Execute(CommandLineArgs.ToArray());

            Log.Received().Information("Deleted auto deploy release override for the project OctoFx to the environment Production");
            Repository.Projects.ReceivedWithAnyArgs().Modify(null);
            Assert.True(!savedProject.AutoDeployReleaseOverrides.Any());
        }
        public async Task ShouldDeleteOverrideForEnvironment()
        {
            CommandLineArgs.Add("-project=OctoFx");
            CommandLineArgs.Add("-environment=Production");

            project.AutoDeployReleaseOverrides.Add(new AutoDeployReleaseOverrideResource(environment.Id, release.Id));

            await deleteAutoDeployOverrideCommand.Execute(CommandLineArgs.ToArray()).ConfigureAwait(false);

            LogLines.Should().Contain("Deleted auto deploy release override for the project OctoFx to the environment Production");
            await Repository.Projects.ReceivedWithAnyArgs().Modify(null).ConfigureAwait(false);

            Assert.True(!savedProject.AutoDeployReleaseOverrides.Any());
        }