Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public void ResolveFor_ShouldReturnRoute_WhenRouteMatches()
 {
     var collection = new RouteCollection();
     collection.Add(new TrueRoute());
     Assert.IsNotNull(collection.ResolveFor(null));
 }
Exemplo n.º 3
0
 public void ResolveFor_ShouldReturnNull_WhenNoRouteMatches()
 {
     var collection = new RouteCollection();
     collection.Add(new FalseRoute());
     Assert.IsNull(collection.ResolveFor(null));
 }