private async Task ProcessCaptureHelper(TagHelperOutput output, string name = "UniqueValue", int?priority = null) { var captureTag = new CaptureTagHelper { Capture = name, Priority = priority, ViewContext = _viewContext }; await captureTag.ProcessAsync(CreateHelperContext(), output); }
public void GlobalSetup() { _viewContext = new ViewContext { HttpContext = new DefaultHttpContext() }; var random = new Random(); var randomString = new string(Enumerable.Range(0, StringLength).Select(n => (char)random.Next()).ToArray()); _captureOutput = CreateCaptureTagWith(randomString); _captureContext = CreateHelperContext(); _captureTag = new CaptureTagHelper { Capture = "UniqueValue", Priority = null, ViewContext = _viewContext }; }