public void RedirectPermanent_WithParameterUrl_SetsRedirectResultPermanentAndSameUrl() { // Arrange var controller = new TestableController(); var url = "/test/url"; // Act var result = controller.RedirectPermanent(url); // Assert Assert.IsType<RedirectResult>(result); Assert.True(result.Permanent); Assert.Same(url, result.Url); }
public void RedirectPermanent_WithParameter_NullOrEmptyUrl_Throws(string url) { // Arrange var controller = new TestableController(); // Act & Assert ExceptionAssert.ThrowsArgumentNullOrEmpty( () => controller.RedirectPermanent(url: url), "url"); }