public void WHEN_WishList_with_no_Items_SHOULD_ShareUrl_Be_Empty() { //Arrange _container.Use(WishListRepositoryFactory.CreateWithNullValues()); MockFixCartService(); var service = _container.CreateInstance <WishListViewService>(); //Act var vm = service.GetWishListViewModelAsync(new GetCartParam { Scope = "Canada", BaseUrl = GetRandom.String(128), CartName = "WishList", CultureInfo = TestingExtensions.GetRandomCulture(), CustomerId = Guid.NewGuid() }).Result; //Assert vm.ShareUrl.Should().BeEmpty(); }
public void WHEN_WishList_with_Items_SHOULD_setup_TotalQuantity() { //Arrange var wishList = CreateWishListWithLineItems(); MockFixCartService(); _container.Use(WishListRepositoryFactory.CreateWithValues(wishList)); var service = _container.CreateInstance <WishListViewService>(); //Act var vm = service.GetWishListViewModelAsync(new GetCartParam { Scope = "Canada", BaseUrl = GetRandom.String(128), CartName = "WishList", CultureInfo = TestingExtensions.GetRandomCulture(), CustomerId = Guid.NewGuid() }).Result; //Assert vm.TotalQuantity.Should().Be(2); }