{
var rd = new RouteCollection () { RouteExistingFiles = true }.GetRouteData (new HttpContextStub2 (null, null, null));
Assert.IsNull (rd, "#A1");
-#if NET_4_0
rd = new RouteCollection ().GetRouteData (new HttpContextStub2 (null, null, null));
Assert.IsNull (rd, "#A2");
-#else
- try {
- new RouteCollection ().GetRouteData (new HttpContextStub2 (null, null, null));
- Assert.Fail ("#A3");
- } catch (NotImplementedException) {
- // it should fail due to the NIE on AppRelativeCurrentExecutionFilePath.
- }
-#endif
}
[Test]
Assert.IsNotNull (rd, "#A1");
}
-#if NET_4_0
[Test]
public void Ignore_String ()
{
Assert.AreEqual (typeof (PageRouteHandler), rd.RouteHandler.GetType (), "#A4-3");
Assert.IsFalse (((PageRouteHandler) rd.RouteHandler).CheckPhysicalUrlAccess, "#A4-4");
}
-#endif
+
+ [Test] // https://bugzilla.xamarin.com/show_bug.cgi?id=13909
+ public void MapPageRoute_Bug13909 ()
+ {
+ var c = new RouteCollection ();
+
+ c.MapPageRoute("test", "test", "~/test.aspx");
+ c.Clear();
+ c.MapPageRoute("test", "test", "~/test.aspx");
+ }
}
}