public void ConvertToRouteValueDictionary_WithNull_ReturnsNull() { // Arrange, Act var dictionary = RouteValueDictionaryExtensions.ConvertToRouteValueDictionary(null); // Assert PAssert.IsTrue(() => dictionary == null); }
public void ConvertToRouteValueDictionary_WithObjectDictionary_ReturnsPopulatedDictionary() { // Arrange var routeValues = new { foo = "bar" }; // Act var dictionary = RouteValueDictionaryExtensions.ConvertToRouteValueDictionary(routeValues); // Assert PAssert.IsTrue(() => (string)dictionary["foo"] == "bar"); }
public void ConvertToRouteValueDictionary_WithObjectThatIsDictionary_JustReturnsObjectCastToDictionary() { // Arrange object routeValues = new RouteValueDictionary(); // Act var dictionary = RouteValueDictionaryExtensions.ConvertToRouteValueDictionary(routeValues); // Assert PAssert.IsTrue(() => routeValues == dictionary); }