public async Task ShouldReturnPackageSummary() { var package = _generator.CreateCarePackage(); _generator.CreateCarePackageReclaim(package, ClaimCollector.Hackney, ReclaimType.Fnc); _generator.CreateCarePackageReclaim(package, ClaimCollector.Supplier, ReclaimType.CareCharge); _generator.CreateCarePackageDetails(package, 1, PackageDetailType.CoreCost); _generator.CreateCarePackageDetails(package, 5, PackageDetailType.AdditionalNeed); _generator.CreateCarePackageSettings(package.Id); var response = await _fixture.RestClient .GetAsync <CarePackageSummaryResponse>($"api/v1/care-packages/{package.Id}/summary"); response.Message.StatusCode.Should().Be(HttpStatusCode.OK); }
public async Task ShouldReturnPackageBrokerageInfo() { var package = _generator.CreateCarePackage(PackageType.NursingCare); var coreCost = (_generator.CreateCarePackageDetails(package, 1, PackageDetailType.CoreCost)).First(); var details = _generator.CreateCarePackageDetails(package, 3, PackageDetailType.AdditionalNeed); var response = await _fixture.RestClient .GetAsync <CarePackageBrokerageResponse>($"api/v1/care-packages/{package.Id}/details"); response.Message.StatusCode.Should().Be(HttpStatusCode.OK); response.Content.CoreCost.Should().Be(coreCost.Cost); response.Content.StartDate.Should().Be(coreCost.StartDate); response.Content.EndDate.Should().Be(coreCost.EndDate); response.Content.SupplierId.Should().Be(package.SupplierId); response.Content.Details.Should().BeEquivalentTo(details, opt => opt.ExcludingMissingMembers()); }
public async Task ShouldReturnFundedNursingCareReclaim() { var package = _generator.CreateCarePackage(PackageType.NursingCare); var packageDetails = _generator.CreateCarePackageDetails(package, 1, PackageDetailType.CoreCost); var request = FundedNursingCareCreationRequest(package.Id); request.Cost = packageDetails.First().Cost - 10M; request.StartDate = packageDetails.First().StartDate; request.EndDate = packageDetails.First().EndDate; await CreateFncReclaim(request); var response = await _fixture.RestClient .GetAsync <CarePackageReclaimResponse>($"api/v1/care-packages/{request.CarePackageId}/reclaims/fnc"); response.Message.StatusCode.Should().Be(HttpStatusCode.OK); response.Content.Should().BeEquivalentTo(request, opt => opt .Excluding(reclaim => reclaim.EndDate) .Excluding(reclaim => reclaim.AssessmentFileId) .Excluding(reclaim => reclaim.AssessmentFile)); }