AspNet.Mvc.TypedRouting.Test.LinkGeneration.MyTestController.CreatedAtActionOtherController C# (CSharp) Method

CreatedAtActionOtherController() public method

public CreatedAtActionOtherController ( ) : IActionResult
return IActionResult
        public IActionResult CreatedAtActionOtherController()
        {
            return this.CreatedAtAction<OtherController>(c => c.Action(), "test");
        }

Usage Example

        public void CreatedAtAction_OtherController_ResolvesCorrectly()
        {
            // Arrange
            var controller = new MyTestController();

            // Act
            var result = controller.CreatedAtActionOtherController() as CreatedAtActionResult;

            // Assert
            Assert.NotNull(result);
            Assert.Equal("Other", result.ControllerName);
            Assert.Equal("Action", result.ActionName);
            Assert.Null(result.RouteValues);
            Assert.Equal("test", result.Value);
        }
All Usage Examples Of AspNet.Mvc.TypedRouting.Test.LinkGeneration.MyTestController::CreatedAtActionOtherController