Esempio n. 1
0
        public void CanDiscoverRoute()
        {
            // Arrange & Act
            var routes = RouteTable.Create(new[] { typeof(MyComponent), });

            // Assert
            Assert.Equal("Test1", Assert.Single(routes.Routes).Template.TemplateText);
        }
Esempio n. 2
0
        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));
        }