Simplify collection initialization (#6897)
- Addresses VS message "IDE0028 Collection initialization can be simplified"
This commit is contained in:
parent
950db6587c
commit
9fbb2f1141
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue