public void CanDiscoverRoute() { // Arrange & Act var routes = RouteTable.Create(new[] { typeof(MyComponent), }); // Assert Assert.Equal("Test1", Assert.Single(routes.Routes).Template.TemplateText); }
public void CanDiscoverRoutes_WithInheritance() { // Arrange & Act var routes = RouteTable.Create(new[] { typeof(MyComponent), typeof(MyInheritedComponent), }); // Assert Assert.Collection( routes.Routes.OrderBy(r => r.Template.TemplateText), r => Assert.Equal("Test1", r.Template.TemplateText), r => Assert.Equal("Test2", r.Template.TemplateText)); }