public void when_use_with_filter_with_just_interfaces_should_work() { //----------------------------------------------------------------------------------------------------------- // Arrange //----------------------------------------------------------------------------------------------------------- const string assemblyName = "FluentAssemblyScanner.Tests"; //----------------------------------------------------------------------------------------------------------- // Act //----------------------------------------------------------------------------------------------------------- FromAssemblyDefiner instance = AssemblyScanner.FromAssemblyNamed(assemblyName); //----------------------------------------------------------------------------------------------------------- // Assert //----------------------------------------------------------------------------------------------------------- List <Type> scannedTypes = instance.IncludeNonPublicTypes() .PickAny() .Filter() .Interfaces() .Scan(); scannedTypes.Count.Should().Be(2); scannedTypes.Should().Contain(typeof(ISecurityService)); scannedTypes.Should().Contain(typeof(ISecurityService)); }
public void when_use_with_filter_with_static_classes_should_return_also_static_classes() { //----------------------------------------------------------------------------------------------------------- // Arrange //----------------------------------------------------------------------------------------------------------- const string assemblyName = "FluentAssemblyScanner.Tests"; //----------------------------------------------------------------------------------------------------------- // Act //----------------------------------------------------------------------------------------------------------- FromAssemblyDefiner instance = AssemblyScanner.FromAssemblyNamed(assemblyName); //----------------------------------------------------------------------------------------------------------- // Assert //----------------------------------------------------------------------------------------------------------- List <Type> scannedTypes = instance.IncludeNonPublicTypes() .PickAny() .Filter() .Classes() .NonAttribute() .Scan(); scannedTypes.Should().Contain(typeof(SomeStaticClass)); }