public void ShouldFindTheCorrectRoute() { string expectedUrl = "/Test/IVRMethod_ReturnSomeAction"; IIVRRouteProvider routeProvider = new IVRRouteProvider(); string actualUrl = routeProvider.GetUrlMethod(MyRoutes.ACTION1); Assert.AreEqual(expectedUrl, actualUrl); }
public void ShouldGenerateTheCorrectLinkWithParam2() { int profileId = 123; string expectedUrl = "/Test/MyActionWithParam2?profileId=123"; IIVRRouteProvider routeProvider = new IVRRouteProvider(); string actualUrl = routeProvider.GetUrlMethod(MyRoutes.ACTION3, profileId.ToString()); Assert.AreEqual(expectedUrl, actualUrl); }
public void ShouldGenerateTheCorrectLinkWithParam3() { int profileId = 123; int nextId = 321; string expectedUrl = "/Test/MyActionWithParam3?profileId=123&nextParam=321"; IIVRRouteProvider routeProvider = new IVRRouteProvider(); string actualUrl = routeProvider.GetUrlMethod(MyRoutes.ACTION4, profileId, nextId); Assert.AreEqual(expectedUrl, actualUrl); }