private static RenderTreeFrame[] GetRenderTree(IComponent component) { var renderer = new TestRenderer(); renderer.AttachComponent(component); component.SetParameters(ParameterCollection.Empty); return renderer.LatestBatchReferenceFrames; }
protected private RenderTreeFrame[] GetRenderTree(TestRenderer renderer, IComponent component) { renderer.AttachComponent(component); var task = renderer.Dispatcher.InvokeAsync(() => component.SetParametersAsync(ParameterCollection.Empty)); // we will have to change this method if we add a test that does actual async work. Assert.True(task.Status.HasFlag(TaskStatus.RanToCompletion) || task.Status.HasFlag(TaskStatus.Faulted)); if (task.IsFaulted) { ExceptionDispatchInfo.Capture(task.Exception.InnerException).Throw(); } return(renderer.LatestBatchReferenceFrames); }