public async Task AddLtcPharmacy() { var customerSvc = Container.Resolve <ICustomerAppService>(); var customerId = await AddCustomerAsync(customerSvc); await customerSvc.AddLtcPharmacyAsync(customerId, "1st Choice"); var customer = await customerSvc.GetAsync(customerId); CollectionAssert.AreEquivalent( new List <string> { "Pruitt", "Alixa", "1st Choice" }, customer !.LtcPharmacies.Select(p => p.Name).ToList() ); }
public async Task RemoveLtcPharmacy() { var customerSvc = Container.Resolve <ICustomerAppService>(); var customerId = await AddCustomerAsync(customerSvc); var customer = await customerSvc.GetAsync(customerId); var pruittId = customer !.LtcPharmacies.Single(p => p.Name == "Pruitt").Id; await customerSvc.RemoveLtcPharmacyAsync(customerId, pruittId); customer = await customerSvc.GetAsync(customerId); CollectionAssert.AreEquivalent( new List <string> { "Alixa" }, customer !.LtcPharmacies.Select(p => p.Name).ToList() ); }