public async Task GetValueProviderAsync_ReturnsNull_WhenContentTypeIsNotFormUrlEncoded() { // Arrange var context = CreateContext("some-content-type"); var factory = new FormValueProviderFactory(); // Act var result = await factory.GetValueProviderAsync(context); // Assert Assert.Null(result); }
public async Task GetValueProviderAsync_ReturnsNull_WhenContentTypeIsNotFormUrlEncoded() { // Arrange var context = CreateContext("some-content-type"); var factory = new FormValueProviderFactory(); // Act var result = await factory.GetValueProviderAsync(context); // Assert Assert.Null(result); }
public async Task GetValueProviderAsync_ReturnsValueProvider_WithCurrentCulture(string contentType) { // Arrange var context = CreateContext(contentType); var factory = new FormValueProviderFactory(); // Act var result = await factory.GetValueProviderAsync(context); // Assert var valueProvider = Assert.IsType<FormValueProvider>(result); Assert.Equal(CultureInfo.CurrentCulture, valueProvider.Culture); }
public async Task GetValueProviderAsync_ReturnsValueProvider_WithCurrentCulture(string contentType) { // Arrange var context = CreateContext(contentType); var factory = new FormValueProviderFactory(); // Act var result = await factory.GetValueProviderAsync(context); // Assert var valueProvider = Assert.IsType <FormValueProvider>(result); Assert.Equal(CultureInfo.CurrentCulture, valueProvider.Culture); }