public async void ProcessAsync_Should_Set_ParentType_Context(DoDontListType type) { _tagHelper.DoDontListType = type; await _tagHelper.ProcessAsync(_tagHelperContext, _tagHelperOutput); Assert.Equal(_tagHelperContext.Items["ParentType"], _tagHelper.DoDontListType); }
public async void ProcessAsync_Should_Set_Do_PreContent(DoDontListType type) { _tagHelper.DoDontListType = type; await _tagHelper.ProcessAsync(_tagHelperContext, _tagHelperOutput); Assert.Equal(string.Format("<h3 class=\"nhsuk-do-dont-list__label\">Do</h3>" + "<ul class=\"{0}\">", CssClasses.NhsUkListTick), _tagHelperOutput.PreContent.GetContent()); }
public async void ProcessAsync_Should_Set_Do_Content(DoDontListType type) { _tagHelperContext.Items["ParentType"] = type; var expected = "<svg class=\"nhsuk-icon nhsuk-icon__tick\" xmlns=\"http://www.w3.org/2000/svg\"" + " viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path stroke-width=\"4\"" + " stroke-linecap=\"round\" d=\"M18.4 7.8l-8.5 8.4L5.6 12\"></path></svg>" + Text; await _tagHelper.ProcessAsync(_tagHelperContext, _tagHelperOutput); Assert.Equal(expected, _tagHelperOutput.Content.GetContent()); }