RedirectToDefault() public method

public RedirectToDefault ( ) : Microsoft.AspNetCore.Mvc.RedirectToRouteResult
return Microsoft.AspNetCore.Mvc.RedirectToRouteResult
コード例 #1
0
        protected RedirectToActionResult RedirectToDefault(BaseController controller)
        {
            RedirectToActionResult result = new RedirectToActionResult(null, null, null);
            controller.When(sub => sub.RedirectToDefault()).DoNotCallBase();
            controller.RedirectToDefault().Returns(result);

            return result;
        }
コード例 #2
0
        protected RedirectToRouteResult RedirectToDefault(BaseController controller)
        {
            RedirectToRouteResult result = new RedirectToRouteResult(new RouteValueDictionary());
            controller.When(sub => sub.RedirectToDefault()).DoNotCallBase();
            controller.RedirectToDefault().Returns(result);

            return result;
        }