Ejemplo n.º 1
0
        public static string GetHtml(TestRenderer renderer, int componentId)
        {
            var frames      = renderer.GetCurrentRenderTreeFrames(componentId);
            var context     = new HtmlRenderingContext(renderer);
            var newPosition = RenderFrames(context, frames, 0, frames.Count);

            Debug.Assert(newPosition == frames.Count);
            return(string.Join(string.Empty, context.Result));
        }
Ejemplo n.º 2
0
        public (int, object) FindComponentUnderTest()
        {
            var ownFrames = _renderer.GetCurrentRenderTreeFrames(_componentId);

            if (ownFrames.Count == 0)
            {
                throw new InvalidOperationException($"{nameof(ContainerComponent)} hasn't yet rendered");
            }

            ref var childComponentFrame = ref ownFrames.Array[0];