public void TestProjectController_GetRequestUrl(string httpMethod, string testValue) { SetUpProjectControllerForTesting(httpMethod); projectController.CurrentUser = user; long _quoteId = 1234; long _commissionRequestId = 2345; string _previousRequestUrl = "/Projectdashboard/Project"; string result; switch (testValue) { case "ProjectId,QuoteId,CommisionRequestId": result = projectController.GetRequestUrl(projectId, _quoteId, _commissionRequestId, _previousRequestUrl); Assert.That(result, Is.Not.Empty); Assert.That(result, Is.EqualTo("ProjectDashboard/CommissionRequest/" + projectId + "/" + _quoteId + "?CommissionRequestId=" + _commissionRequestId)); break; case "ProjectId,QuoteId": result = projectController.GetRequestUrl(projectId, _quoteId, null, _previousRequestUrl); Assert.That(result, Is.Not.Empty); Assert.That(result, Is.EqualTo("ProjectDashBoard/Quote/" + projectId + "/" + _quoteId)); break; case "ProjectId": result = projectController.GetRequestUrl(projectId, null, null, _previousRequestUrl); Assert.That(result, Is.Not.Empty); Assert.That(result, Is.EqualTo("ProjectDashboard/Project" + projectId)); break; } }