public void SetPath_WhenProvidedWithAValidOneWordPath_SetsCorrectly() { const string routePath = "Google"; var attribute = new UrlRouteAttribute(); attribute.Path = routePath; Assert.AreEqual(routePath, attribute.Path); }
public void SetPath_WhenProvidedWithPathSuffixedWithASlash_ThrowsArgumentException() { const string routePath = "Google/"; var attribute = new UrlRouteAttribute(); attribute.Path = routePath; // Exception }
public void SetPath_WhenProvidedWithAValidMultiWordPath_SetsCorrectly() { const string routePath = "Search/Api/Google/Redirect"; var attribute = new UrlRouteAttribute(); attribute.Path = routePath; Assert.AreEqual(routePath, attribute.Path); }