public void ResolveFor_ShouldReturnFirstRoute_WhenMultipleRouteMatches() { var collection = new RouteCollection(); var first = new TrueRoute { Name = "first route" }; var second = new TrueRoute { Name = "second route" }; collection.Add(first); collection.Add(second); var actual = (string)collection.ResolveFor(null).Data; Assert.AreEqual(first.Name, actual); }
public void ResolveFor_ShouldReturnRoute_WhenRouteMatches() { var collection = new RouteCollection(); collection.Add(new TrueRoute()); Assert.IsNotNull(collection.ResolveFor(null)); }
public void ResolveFor_ShouldReturnNull_WhenNoRouteMatches() { var collection = new RouteCollection(); collection.Add(new FalseRoute()); Assert.IsNull(collection.ResolveFor(null)); }