Assert.Catch(typeof(ArgumentException), () => Routing.RegisterRoute("app://tab2/IMPL_tab21", typeof(ShellItem)));
}
+ [Test]
+ public async Task FailWhenAddingDuplicatedRouting()
+ {
+ var route = "dogs";
+ Routing.RegisterRoute(route, typeof(ShellItem));
+
+ Assert.Catch(typeof(ArgumentException), () => Routing.RegisterRoute("dogs", typeof(ShellItem)));
+ }
[Test]
public async Task RelativeGoTo()
if (IsImplicit(part))
throw new ArgumentException($"Route contains invalid characters in \"{part}\"");
}
+
+ if (CompareWithRegisteredRoutes(route))
+ throw new ArgumentException($"Duplicated Route: \"{route}\"");
}
class TypeRouteFactory : RouteFactory