/// <summary>
/// Initialize the view component with mock services it needs to
/// be functional.
/// </summary>
/// <param name="component">The component instance.</param>
protected void PrepareViewComponent(ViewComponent component)
{
if (Context == null)
{
BuildEngineContext("", "Controller", "Action");
}
viewEngine = BuildViewEngine();
componentContext = BuildViewComponentContext(component.GetType().Name);
component.Init(Context, componentContext);
}