Ejemplo n.º 1
0
        public async Task CanPrepareCartItemPictureModel()
        {
            var product = await _producService.GetProductByIdAsync(_shoppingCartItem.ProductId);

            var model = await _shoppingCartModelFactory.PrepareCartItemPictureModelAsync(_shoppingCartItem, 100, true, await _localizationService.GetLocalizedAsync(product, x => x.Name));

            model.AlternateText.Should().Be("Picture of Build your own computer");
            model.ImageUrl.Should()
            .Be($"http://{NopTestsDefaults.HostIpAddress}/images/thumbs/0000020_build-your-own-computer_100.jpeg");
            model.Title.Should().Be("Show details for Build your own computer");

            model.FullSizeImageUrl.Should().BeNull();
            model.ThumbImageUrl.Should().BeNull();
        }