public ManagerResponse <DeleteWishListResult, WishList> DeleteWishList(WishList wishList) { Assert.ArgumentNotNull(wishList, nameof(wishList)); DeleteWishListResult wishListResult = _wishListServiceProvider.DeleteWishList(new DeleteWishListRequest(wishList)); Helpers.LogSystemMessages(wishListResult.SystemMessages, wishListResult); DeleteWishListResult serviceProviderResult = wishListResult; return(new ManagerResponse <DeleteWishListResult, WishList>(serviceProviderResult, serviceProviderResult.WishList)); }
/// <summary> /// Initializes a new instance of the <see cref="DeleteCartTest"/> class. /// </summary> public DeleteWishlistTest() { this.visitorId = Guid.NewGuid(); this.wishlist = new WishList { ExternalId = this.visitorId.ToString() }; this.request = new DeleteWishListRequest(this.wishlist); this.result = new DeleteWishListResult(); this.args = new ServicePipelineArgs(this.request, this.result); this.client = Substitute.For <IWishlistsServiceChannel>(); var clientFactory = Substitute.For <ServiceClientFactory>(); clientFactory.CreateClient <IWishlistsServiceChannel>(Arg.Any <string>(), Arg.Any <string>()).Returns(this.client); this.processor = new DeleteWishlist { ClientFactory = clientFactory }; }