public async Task DoesNotCreateValueProvider_WhenQueryIsEmpty()
        {
            // Arrange
            var context = CreateContext(new Dictionary <string, StringValues>());
            var factory = new JQueryQueryStringValueProviderFactory();

            // Act
            await factory.CreateValueProviderAsync(context);

            // Assert
            Assert.Empty(context.ValueProviders);
        }
        public async Task GetValueProvider_ReturnsValueProvider_ContainingExpectedKeys(string key)
        {
            // Arrange
            var context = CreateContext(_backingStore);
            var factory = new JQueryQueryStringValueProviderFactory();

            // Act
            await factory.CreateValueProviderAsync(context);

            // Assert
            var valueProvider = Assert.Single(context.ValueProviders);
            var result        = valueProvider.GetValue(key);

            Assert.Equal("found", (string)result);
        }
        public async Task CreatesValueProvider_WithInvariantCulture()
        {
            // Arrange
            var context = CreateContext(_backingStore);
            var factory = new JQueryQueryStringValueProviderFactory();

            // Act
            await factory.CreateValueProviderAsync(context);

            // Assert
            var valueProvider = Assert.Single(context.ValueProviders);
            var jqueryQueryStringValueProvider = Assert.IsType <JQueryQueryStringValueProvider>(valueProvider);

            Assert.Equal(CultureInfo.InvariantCulture, jqueryQueryStringValueProvider.Culture);
        }