Simplify collection initialization (#6897)

- Addresses VS message "IDE0028 Collection initialization can be simplified"
This commit is contained in:
Mike Harder 2017-10-04 14:12:43 -07:00 committed by GitHub
parent 950db6587c
commit 9fbb2f1141
1 changed files with 4 additions and 2 deletions

View File

@ -406,8 +406,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task RedirectToAction_WithEmptyActionName_UsesAmbientValue() public async Task RedirectToAction_WithEmptyActionName_UsesAmbientValue()
{ {
// Arrange // Arrange
var product = new List<KeyValuePair<string, string>>(); var product = new List<KeyValuePair<string, string>>
product.Add(new KeyValuePair<string, string>("SampleInt", "20")); {
new KeyValuePair<string, string>("SampleInt", "20")
};
// Act // Act
var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product)); var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product));