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

Commit 22bb639

Browse files
committed
Addressed code review feedback:
- #1553
1 parent a917b98 commit 22bb639

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/Microsoft.AspNet.Mvc.TagHelpers.Test/EnvironmentTagHelperTest.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,15 @@ private void ShouldShowContent(string namesAttribute, string environmentName)
128128

129129
private TagHelperContext MakeTagHelperContext(IDictionary<string, object> attributes = null, string content = null)
130130
{
131-
if (attributes == null)
132-
{
133-
attributes = new Dictionary<string, object>();
134-
}
131+
attributes = attributes ?? new Dictionary<string, object>();
135132

136133
return new TagHelperContext(attributes, Guid.NewGuid().ToString("N"), () => Task.FromResult(content));
137134
}
138135

139136
private TagHelperOutput MakeTagHelperOutput(string tagName, IDictionary<string, string> attributes = null)
140137
{
141-
if (attributes == null)
142-
{
143-
attributes = new Dictionary<string, string>();
144-
}
145-
138+
attributes = attributes ?? new Dictionary<string, string>();
139+
146140
return new TagHelperOutput(tagName, attributes);
147141
}
148142
}

0 commit comments

Comments
 (0)