diff --git a/test/Microsoft.AspNet.Mvc.Routing.Abstractions.Tests/RouteValueDictionaryTests.cs b/test/Microsoft.AspNet.Mvc.Routing.Abstractions.Tests/RouteValueDictionaryTests.cs index 34e805c88d..299c90ff8c 100644 --- a/test/Microsoft.AspNet.Mvc.Routing.Abstractions.Tests/RouteValueDictionaryTests.cs +++ b/test/Microsoft.AspNet.Mvc.Routing.Abstractions.Tests/RouteValueDictionaryTests.cs @@ -160,17 +160,15 @@ namespace Microsoft.AspNet.Routing.Tests public void CreateFromObject_MixedCaseThrows() { // Arrange - var expected = GetDuplicateKeyErrorMessage(); var obj = new { controller = "Home", Controller = "Home" }; // Act & Assert ExceptionAssert.Throws( - () => - { - var dictionary = new RouteValueDictionary(obj); - dictionary.Add("Hi", "There"); - }, - expected); + () => + { + var dictionary = new RouteValueDictionary(obj); + dictionary.Add("Hi", "There"); + }); } public static IEnumerable IEnumerableKeyValuePairData @@ -226,20 +224,6 @@ namespace Microsoft.AspNet.Routing.Tests Assert.Equal("Washington", ((Address)routeValueDictionary["Address"]).State); } - private static string GetDuplicateKeyErrorMessage() - { - // Gets the exception message when duplicate entries are - // added to a Dictionary in a platform independent way - var ex = Assert.Throws( - () => new Dictionary() - { - { "key", "value" }, - { "key", "value" } - }); - - return ex.Message; - } - private class RegularType { public bool IsAwesome { get; set; }