public async Task WhenListItemHelperCalled_ThenCorrectClassCalled() { var tagHelper = Substitute.For <IMockViewComponentHelper>(); var componentTag = new ListItemTagHelper(tagHelper) { Text = "Test" }; string text = componentTag.Text; await ViewComponentTestHelper.CallTagHelper("ListItem", tagHelper, componentTag); }
/// <summary> /// 测试初始化 /// </summary> public ListItemTagHelperTest(ITestOutputHelper output) { _output = output; _component = new ListItemTagHelper(); }