public void PublicConcreteTypeOfIAttributeRouting_ShouldBeQualifiedType() { var routeExtractor = new DefaultModuleRouteExtractor(); var qualified = routeExtractor.IsQualifiedType(typeof(QualifiedApiControllerClass)); Assert.True(qualified); }
public void QualifiedTypeWithQualifiedNumberOfMethods_ShouldBeReturn_TheSameNumberOfRouteInfos() { var routeExtractor = new DefaultModuleRouteExtractor(); var methods = routeExtractor.FindQualifiedMethods(typeof(QualifiedApiControllerClassWithMethods)); var routeInfos = routeExtractor.ExtractRoutes(typeof(QualifiedApiControllerClassWithMethods)); Assert.Equal(methods.Count, routeInfos.Count); }
public void ShouldNotBeQualifiedType(Type notQualifiedType) { var routeExtractor = new DefaultModuleRouteExtractor(); var qualified = routeExtractor.IsQualifiedType(notQualifiedType); Assert.False(qualified); }
public void OnlyQualifiedMethods_ShouldBeReturned() { var routeExtractor = new DefaultModuleRouteExtractor(); var methods = routeExtractor.FindQualifiedMethods(typeof(QualifiedApiControllerClassWithMethods)); Assert.True(methods.All(a=> a.Name.StartsWith("QualifiedMethod"))); }