public List <CarePackageDetail> CreateCarePackageDetails(CarePackage package, int count, PackageDetailType type)
        {
            var faker      = new Bogus.Faker();
            var costPeriod = type switch
            {
                PackageDetailType.CoreCost => PaymentPeriod.Weekly,
                PackageDetailType.AdditionalNeed => faker.PickRandom(PaymentPeriod.Weekly, PaymentPeriod.OneOff),
                _ => PaymentPeriod.Weekly
            };
            var details = TestDataHelper.CreateCarePackageDetails(count, type, costPeriod);

            package.Details.AddRange(details);
            _context.SaveChanges();

            return(details);
        }
        public GetCarePackageBrokerageUseCaseTest()
        {
            _package = new CarePackage
            {
                Id      = Guid.NewGuid(),
                Details =
                    TestDataHelper.CreateCarePackageDetails(1, PackageDetailType.CoreCost).Concat(
                        TestDataHelper.CreateCarePackageDetails(3, PackageDetailType.AdditionalNeed)).ToList()
            };

            _gatewayMock = new Mock <ICarePackageGateway>();
            _gatewayMock
            .Setup(mock => mock.GetPackageAsync(_package.Id, PackageFields.Details, false))
            .ReturnsAsync(_package);

            _useCase = new GetCarePackageBrokerageUseCase(_gatewayMock.Object);
        }