public void ReturnsFalseWhenExcludesIsEmpty() { var scanner = new RouteScanner(); scanner.CheckIsExcluded(AppDomain.CurrentDomain.GetAssemblies().First()).ShouldBeFalse(); scanner.CheckIsExcluded("Some.Other.Namespace").ShouldBeFalse(); scanner.CheckIsExcluded(typeof(Route)).ShouldBeFalse(); }
public void ReturnsFalseWhenNamespaceIsNotExcluded() { var scanner = new RouteScanner(); scanner.Exclude("Some.Random.Namespace"); scanner.CheckIsExcluded("Some.Other.Namespace").ShouldBeFalse(); }
public void ReturnsFalseWhenTypeIsNotExcluded() { var scanner = new RouteScanner(); scanner.Exclude <Route>(); scanner.CheckIsExcluded(typeof(Router)).ShouldBeFalse(); }
public void ReturnsTrueWhenNamespaceIsExcluded() { var scanner = new RouteScanner(); scanner.Exclude("Some.Random.Namespace"); scanner.CheckIsExcluded("Some.Random.Namespace").ShouldBeTrue(); }
public void ReturnsTrueWhenGenericTypeIsExcluded() { var scanner = new RouteScanner(); scanner.Exclude <Route>(); scanner.CheckIsExcluded(typeof(Route)).ShouldBeTrue(); }
public void ReturnsTrueWhenAssemblyIsExcluded() { var assembly = AppDomain.CurrentDomain.GetAssemblies().First(); var scanner = new RouteScanner(); scanner.Exclude(assembly); scanner.CheckIsExcluded(assembly).ShouldBeTrue(); }
public void ReturnsFalseWhenAssemblyIsNotExcluded() { var assemblies = AppDomain.CurrentDomain.GetAssemblies(); var assembly1 = assemblies[0]; var assembly2 = assemblies[2]; var scanner = new RouteScanner(); scanner.Exclude(assembly1); scanner.CheckIsExcluded(assembly2).ShouldBeFalse(); }