public void ThenICanUpdateReport() { var report = new ReportDTO { Date = DateTime.UtcNow, NumberOfWorkers = 14, Work = new[] { new ReportQuantity { EstimationId = (int)ScenarioContext.Current[EstimationId], Quantity = new decimal(17) } } }; var reportId = ScenarioContext.Current[ReportId]; var buildingId = ScenarioContext.Current[BuildingId]; Client.Post($"buildings/{buildingId}/reports/{reportId}", report); ScenarioContext.Current[ReportDate] = report.Date; }
public void WhenICreateReport() { var report = new ReportDTO { Date = DateTime.UtcNow, NumberOfWorkers = 14, Work = new [] { new ReportQuantity { EstimationId = (int)ScenarioContext.Current[EstimationId], Quantity = new decimal(14.5) } } }; var buildingId = ScenarioContext.Current[BuildingId]; var reportId = Client.Put($"buildings/{buildingId}/reports", report); ScenarioContext.Current[ReportId] = reportId; ScenarioContext.Current[ReportDate] = report.Date; ScenarioContext.Current[EstimationId] = report.Work.ToArray()[0].EstimationId; }