Exemplo n.º 1
0
 /// <inheritdoc />
 public IAndViewComponentBuilder <TViewComponent> WithActionContext(
     ActionContext actionContext)
 {
     CommonValidator.CheckForNullReference(actionContext, nameof(ActionContext));
     this.TestContext.ComponentContext = ViewContextMock.FromActionContext(this.TestContext, actionContext);
     return(this);
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 public IAndViewComponentBuilder <TViewComponent> WithViewContext(
     ViewContext viewContext)
 {
     CommonValidator.CheckForNullReference(viewContext, nameof(ViewContext));
     this.TestContext.ComponentContext = ViewContextMock.FromViewContext(this.TestContext, viewContext);
     return(this);
 }