public async Task SkipFirstPresentation_For_StillImage_If_(CostType costType, string contentType, string region, string productionType) { // Arrange var builder = new CreateCostModelBuilder(); if (costType != CostType.Buyout) { builder.WithContentType(contentType); } builder.WithBudgetRegion(region); builder.WithProductionType(productionType); var cost = await CreateCost(builder, AdminUser, costType); // Act var url = $"{CostWorkflowUrl(cost.Id)}/stages"; var response = await Browser.Get(url, w => w.User(AdminUser)); var stageModes = Deserialize <Dictionary <string, StageModel> >(response, HttpStatusCode.OK); // Assert stageModes.Should().HaveCount(4); stageModes.Should().NotContainKeys(CostStages.FirstPresentation.ToString()); stageModes[CostStages.New.ToString()].Transitions.Should().ContainKey(CostStages.FinalActual.ToString()); stageModes[CostStages.OriginalEstimate.ToString()].Transitions.Should().ContainKey(CostStages.FinalActual.ToString()); stageModes[CostStages.OriginalEstimateRevision.ToString()].Transitions.Should().ContainKey(CostStages.FinalActual.ToString()); }
public async Task ReturnSortedAIPEWorklowStages_when_VideoFullProduction() { // Arrange var builder = new CreateCostModelBuilder(); builder.WithContentType(Constants.ContentType.Video); builder.WithBudgetRegion(Constants.BudgetRegion.NorthAmerica); builder.WithProductionType(Constants.ProductionType.FullProduction); var cost = await CreateCost(builder, AdminUser); // Act var url = $"{CostWorkflowUrl(cost.Id)}/stages"; var response = await Browser.Get(url, w => w.User(AdminUser)); var stageModes = Deserialize <Dictionary <string, StageModel> >(response, HttpStatusCode.OK); // Assert stageModes.Should().HaveCount(7); stageModes.Should().ContainKey(CostStages.New.ToString()); stageModes.Should().ContainKey(CostStages.Aipe.ToString()); stageModes.Should().ContainKey(CostStages.OriginalEstimate.ToString()); stageModes.Should().ContainKey(CostStages.OriginalEstimateRevision.ToString()); stageModes.Should().ContainKey(CostStages.FirstPresentation.ToString()); stageModes.Should().ContainKey(CostStages.FirstPresentationRevision.ToString()); stageModes.Should().ContainKey(CostStages.FinalActual.ToString()); stageModes.Skip(1).First().Key.Should().Be(CostStages.Aipe.ToString()); }