示例#1
0
        protected RedirectToActionResult RedirectToDefault(AController controller)
        {
            RedirectToActionResult result = new(null, null, null);

            controller.RedirectToDefault().Returns(result);

            return(result);
        }
示例#2
0
        public void RedirectToDefault_Route()
        {
            RedirectToActionResult actual = controller.RedirectToDefault();

            Assert.Equal(nameof(Home.Index), actual.ActionName);
            Assert.Equal(nameof(Home), actual.ControllerName);
            Assert.Equal("", actual.RouteValues["area"]);
            Assert.Single(actual.RouteValues);
        }