public ActionResult LoadShiftTemplate() { var action = new LoadShiftTemplateAction <ActionResult>(ServiceRegistry) { OnComplete = (model) => View("ShiftTemplate", model) }; return(action.Invoke(ResolveRestaurantId())); }
public void EnsureGuardAgainstNullOnComplete() { var error = ""; try { var action = new LoadShiftTemplateAction <dynamic>(A.Fake <IServiceRegistry>()); action.Invoke(0); } catch (Exception ex) { error = ex.Message; } Assert.IsTrue(error.Contains("OnComplete")); }