Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 9fbb2f1

Browse files
authored
Simplify collection initialization (#6897)
- Addresses VS message "IDE0028 Collection initialization can be simplified"
1 parent 950db65 commit 9fbb2f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Microsoft.AspNetCore.Mvc.FunctionalTests/BasicTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,10 @@ public async Task UsingPageRouteParameterInAttributeRouteWorks()
406406
public async Task RedirectToAction_WithEmptyActionName_UsesAmbientValue()
407407
{
408408
// Arrange
409-
var product = new List<KeyValuePair<string, string>>();
410-
product.Add(new KeyValuePair<string, string>("SampleInt", "20"));
409+
var product = new List<KeyValuePair<string, string>>
410+
{
411+
new KeyValuePair<string, string>("SampleInt", "20")
412+
};
411413

412414
// Act
413415
var response = await Client.PostAsync("/Home/Product", new FormUrlEncodedContent(product));

0 commit comments

Comments
 (0)