public void When_selector_is_null_return_all_types()
        {
            // Arrange
            var assembly = GetTestAssembly();
            var typeProvider = new AssemblyTypeProvider(assembly);

            // Act
            var types = typeProvider.RetrieveTypes(null);

            // Assert
            Assert.Equal(assembly.ExportedTypes, types);
        }
        public void When_selector_is_null_return_all_types()
        {
            // Arrange
            var assembly     = GetTestAssembly();
            var typeProvider = new AssemblyTypeProvider(assembly);

            // Act
            var types = typeProvider.RetrieveTypes(null);

            // Assert
            Assert.Equal(assembly.ExportedTypes, types);
        }
        public void AssemblyTypeProvider_use_typeSelector_in_correct_way()
        {
            // Arrange
            var assembly = GetTestAssembly();
            var selector = new TypeNamesStartsWithSelector("S");
            var typeProvider = new AssemblyTypeProvider(assembly);

            // Act
            var types = typeProvider.RetrieveTypes(selector);

            // Assert
            Assert.All(types, type => type.Name.StartsWith("S"));
        }
        public void AssemblyTypeProvider_use_typeSelector_in_correct_way()
        {
            // Arrange
            var assembly     = GetTestAssembly();
            var selector     = new TypeNamesStartsWithSelector("S");
            var typeProvider = new AssemblyTypeProvider(assembly);

            // Act
            var types = typeProvider.RetrieveTypes(selector);

            // Assert
            Assert.All(types, type => type.Name.StartsWith("S"));
        }