コード例 #1
0
        public ActionResult LoadShiftTemplate()
        {
            var action = new LoadShiftTemplateAction <ActionResult>(ServiceRegistry)
            {
                OnComplete = (model) => View("ShiftTemplate", model)
            };

            return(action.Invoke(ResolveRestaurantId()));
        }
コード例 #2
0
        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"));
        }