public void Directory_should_identify_types_in_each_assembly_found_in_directory_specified_by_path()
        {
            using (var factory = new AssemblyFactory())
            {
                factory.Build(@"public class Foo { }");
                factory.Build(@"public class Bar { }");

                var configurator =
                    new TypeScannerConfigurator();

                configurator.Directory(factory.AssemblyDirectory.FullName);

                var scanner =
                    configurator.GetTypeScanner();

                var results =
                    scanner.GetTypes(x => true);

                results.Count().ShouldEqual(2);
            }
        }
        public void Assembly_should_return_reference_to_same_configurator_when_called_with_path()
        {
            using (var factory = new AssemblyFactory())
            {
                var configurator =
                    new TypeScannerConfigurator();

                var assembly =
                    factory.Build(@"public class Foo { }");

                var reference =
                    configurator.Assembly((string)assembly);

                reference.ShouldBeSameAs(configurator);
            }
        }
        public void Assembly_should_add_scanner_to_configurator_when_called_with_path()
        {
            using (var factory = new AssemblyFactory())
            {
                var configurator =
                    new TypeScannerConfigurator();

                var builtAssembly =
                    factory.Build(
                        @"
                        public class Foo { }
                        class Bar { }
                        public interface IFoo { }
                        interface IBar { }
                        public abstract class Baz { }
                    ");

                configurator.Assembly((string)builtAssembly);

                var scanner =
                    configurator.GetTypeScanner();

                var results =
                    scanner.GetTypes(x => true);

                results.Count().ShouldEqual(1);
            }
        }