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

Commit

Permalink
Updated duplicate TargetElement TagHelper tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
NTaylorMullen committed Mar 20, 2015
1 parent 842549b commit 2b62202
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ private static IEnumerable<TagHelperDescriptor> DuplicateTargetTagHelperDescript
assemblyName: "SomeAssembly",
attributes: new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo)
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
new TagHelperAttributeDescriptor("checked", inputCheckedPropertyInfo)
},
requiredAttributes: new[] { "type" }),
new TagHelperDescriptor(
Expand All @@ -45,14 +46,15 @@ private static IEnumerable<TagHelperDescriptor> DuplicateTargetTagHelperDescript
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
new TagHelperAttributeDescriptor("checked", inputCheckedPropertyInfo)
},
requiredAttributes: new[] { "type", "checked" }),
requiredAttributes: new[] { "checked" }),
new TagHelperDescriptor(
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "SomeAssembly",
attributes: new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo)
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
new TagHelperAttributeDescriptor("checked", inputCheckedPropertyInfo)
},
requiredAttributes: new[] { "type" }),
new TagHelperDescriptor(
Expand All @@ -64,7 +66,7 @@ private static IEnumerable<TagHelperDescriptor> DuplicateTargetTagHelperDescript
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
new TagHelperAttributeDescriptor("checked", inputCheckedPropertyInfo)
},
requiredAttributes: new[] { "type", "checked" })
requiredAttributes: new[] { "checked" })
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ public override async Task ExecuteAsync()
__tagHelperExecutionContext.Add(__InputTagHelper);
__InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
#line 3 "DuplicateTargetTagHelper.cshtml"
__InputTagHelper.Checked = true;

#line default
#line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper.Checked);
__CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>();
__tagHelperExecutionContext.Add(__CatchAllTagHelper);
__CatchAllTagHelper.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute("checked", "true");
__CatchAllTagHelper.Checked = __InputTagHelper.Checked;
__tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
Expand Down

0 comments on commit 2b62202

Please sign in to comment.