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()
{
// Arrange
var product = new List<KeyValuePair<string, string>>();
product.Add(new KeyValuePair<string, string>("SampleInt", "20"));
var product = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("SampleInt", "20")
};
// Act
var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product));