public void Should_find_all_controllers_inheriting_from_abstract_base_controller_excluding_abstract_base_controller()
        {
            // Arrange
            var scanner = new ControllerTypeScanner(typeof(AbstractBaseController));

            // Act
            var result = scanner.Scan(new[] { GetType().Assembly }).ToList();

            // Assert
            Assert.That(result.Single(), Is.EqualTo(typeof(IneritingAbstractBaseController)));
        }
        public void Should_set_the_controller_type()
        {
            // Arrange
            var expectedType = typeof(AdminController);

            // Act
            var scanner = new ControllerTypeScanner(expectedType);

            // Assert
            Assert.That(scanner.ControllerType, Is.EqualTo(expectedType));
        }
        public void Should_find_all_controllers()
        {
            // Arrange
            var scanner = new ControllerTypeScanner();

            // Act
            var result = scanner.Scan(new[] { GetType().Assembly }).ToList();

            // Assert
            Assert.That(result.Count(), Is.EqualTo(10));
        }
        public void Should_set_the_controller_type_to_IController_for_empty_constructor()
        {
            // Arrange
            var expectedType = typeof(IController);

            // Act
            var scanner = new ControllerTypeScanner();

            // Assert
            Assert.That(scanner.ControllerType, Is.EqualTo(expectedType));
        }
        public void Should_find_all_controllers_inheriting_from_base_controller_including_base_controller()
        {
            // Arrange
            var scanner = new ControllerTypeScanner(typeof(BaseController));

            // Act
            var result = scanner.Scan(new[] { GetType().Assembly }).ToList();

            // Assert
            Assert.That(result.First(), Is.EqualTo(typeof(BaseController)));
            Assert.That(result.Last(), Is.EqualTo(typeof(IneritingBaseController)));
            Assert.That(result.Count(), Is.EqualTo(2));
        }