public static string GetHtml(TestRenderer renderer, int componentId) { var frames = renderer.GetCurrentRenderTreeFrames(componentId); var context = new HtmlRenderingContext(renderer); RenderFrames(context, frames, 0, frames.Count); return(context.Result.ToString()); }
public (int componentId, ComponentBase component) FindComponentUnderTest() { var frames = renderer.GetCurrentRenderTreeFrames(componentId); if (frames.Count == 0) { throw new($"{nameof(ContainerComponent)} hasn't yet rendered"); } ref var frame = ref frames.Array[0];