Exemplo n.º 1
0
        public void Exclude_NullTypeGiven_ShouldThrowArgumentNullException()
        {
            IAssemblyTraverserConfigurator configurator = testee;

            configurator.Invoking(x => x.Exclude(null))
            .ShouldThrow <ArgumentNullException>();
        }
Exemplo n.º 2
0
        public void Exclude_TypeGiven_ShouldBeExcluded()
        {
            var assembly      = typeof(TestAssembly.AbstractClass).Assembly;
            var typeToExclude = typeof(TestAssembly.ClassContructor);

            testee = AssemblyTraverser.Create(assembly, "UnitTestGenerator.Tests");
            IAssemblyTraverserConfigurator configurator = testee;

            configurator.Exclude(new[] { typeToExclude });
            var result = testee.GetTypes();

            result.Should().NotContain(typeToExclude);
        }