public async Task ItShouldLoadJsonFileFromHttpClientAsync(
            string cultureName,
            string key,
            string expectedText,
            bool expectedSuccess,
            string resourcePath)
        {
            var cultureInfo = CultureInfo.GetCultureInfo(cultureName);

            using var httpClient = new HttpClientMockBuilder()
                                   .WithBaseAddress(new Uri("http://test.com"))
                                   .WithRequest("/_content/SoloX.BlazorJsonLocalization.WebAssembly.UTests/Resources/HttpHostedJsonLocalizationExtensionServiceTest.json")
                                   .Responding(request =>
            {
                var response     = new HttpResponseMessage();
                response.Content = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes("{\"Test\": \"English test.\"}")));
                return(response);
            })
                                   .WithRequest("/_content/SoloX.BlazorJsonLocalization.WebAssembly.UTests/Resources/HttpHostedJsonLocalizationExtensionServiceTest-fr.json")
                                   .Responding(request =>
            {
                var response     = new HttpResponseMessage();
                response.Content = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes("{\"Test\": \"French test.\"}")));
                return(response);
            })
                                   .Build();

            var service = new HttpHostedJsonLocalizationExtensionService(httpClient, Logger);

            var options = new HttpHostedJsonLocalizationOptions()
            {
                ResourcesPath = resourcePath,
            };

            var map = await service.TryLoadAsync(options, Assembly, BaseName, cultureInfo).ConfigureAwait(false);

            if (expectedSuccess)
            {
                Assert.NotNull(map);
                Assert.Equal(expectedText, map[key]);
            }
            else
            {
                Assert.Null(map);
            }
        }
        public async Task ItShouldLoadJsonFileFromHttpClientAsync(
            string cultureName,
            string key,
            string expectedText,
            bool expectedSuccess,
            string resourcePath)
        {
            var cultureInfo = CultureInfo.GetCultureInfo(cultureName);

            using var stream   = new MemoryStream(Encoding.UTF8.GetBytes("{\"Test\": \"English test.\"}"));
            using var streamFr = new MemoryStream(Encoding.UTF8.GetBytes("{\"Test\": \"French test.\"}"));

            var fileInfoMock = new Mock <IFileInfo>();

            fileInfoMock.SetupGet(f => f.Exists).Returns(true);
            fileInfoMock.Setup(f => f.CreateReadStream()).Returns(stream);

            var fileInfoFrMock = new Mock <IFileInfo>();

            fileInfoFrMock.SetupGet(f => f.Exists).Returns(true);
            fileInfoFrMock.Setup(f => f.CreateReadStream()).Returns(streamFr);

            var fileInfoNoneMock = new Mock <IFileInfo>();

            fileInfoNoneMock.SetupGet(f => f.Exists).Returns(false);

            var fileProviderMock = new Mock <IFileProvider>();

            fileProviderMock
            .Setup(p => p.GetFileInfo(It.IsAny <string>()))
            .Returns(fileInfoNoneMock.Object);
            fileProviderMock
            .Setup(p => p.GetFileInfo("_content/SoloX.BlazorJsonLocalization.ServerSide.UTests/Resources/HttpHostedJsonLocalizationExtensionServiceTest.json"))
            .Returns(fileInfoMock.Object);
            fileProviderMock
            .Setup(p => p.GetFileInfo("_content/SoloX.BlazorJsonLocalization.ServerSide.UTests/Resources/HttpHostedJsonLocalizationExtensionServiceTest-fr.json"))
            .Returns(fileInfoFrMock.Object);

            var hostEnvMock = new Mock <IWebHostEnvironment>();

            hostEnvMock.SetupGet(x => x.WebRootFileProvider).Returns(fileProviderMock.Object);

            var service = new HttpHostedJsonLocalizationExtensionService(hostEnvMock.Object, Logger);

            var options = new HttpHostedJsonLocalizationOptions()
            {
                ResourcesPath = resourcePath,
            };

            var map = await service.TryLoadAsync(options, Assembly, BaseName, cultureInfo).ConfigureAwait(false);

            if (expectedSuccess)
            {
                Assert.NotNull(map);
                Assert.Equal(expectedText, map[key]);
            }
            else
            {
                Assert.Null(map);
            }
        }