From eb433b4c4fccc50f4bebd21f1dbc4bdeb3d6573c Mon Sep 17 00:00:00 2001 From: Eugeny Tatarincev Date: Sat, 16 Nov 2019 10:19:29 +0200 Subject: [PATCH] Fix unit test doesn't pass on CI --- .../ResponseCaching/ResponseCachingTests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VirtoCommerce.Storefront.Tests/ResponseCaching/ResponseCachingTests.cs b/VirtoCommerce.Storefront.Tests/ResponseCaching/ResponseCachingTests.cs index 50bcb6c3d..b276b1c92 100644 --- a/VirtoCommerce.Storefront.Tests/ResponseCaching/ResponseCachingTests.cs +++ b/VirtoCommerce.Storefront.Tests/ResponseCaching/ResponseCachingTests.cs @@ -9,6 +9,8 @@ using Microsoft.Net.Http.Headers; using Moq; using VirtoCommerce.LiquidThemeEngine; +using VirtoCommerce.Storefront.Model; +using VirtoCommerce.Storefront.Model.Common; using VirtoCommerce.Storefront.Model.Stores; using Xunit; using Language = VirtoCommerce.Storefront.Model.Language; @@ -35,6 +37,10 @@ public ResponseCachingTests(WebApplicationFactory factory) mockStoreService.Setup(x => x.GetAllStoresAsync()).ReturnsAsync(new Store[] { new Store { Id = "Electronics", DefaultLanguage = new Language("en-US") } }); services.AddSingleton(mockStoreService.Object); + var mockCurrencyService = new Mock(); + mockCurrencyService.Setup(x => x.GetAllCurrenciesAsync(It.IsAny())).ReturnsAsync(new Currency[] { }); + services.AddSingleton(mockCurrencyService.Object); + }) ).CreateClient(); //Make initial request to get anonymous cookies