public void Should_Not_Find_Is_Module_Registered_By_AreaName()
        {
            var service = new DefaultWebModulesRegistration(new Mock<IAssemblyLoader>().Object, new Mock<IControllerExtensions>().Object);
            var isRegisteted = service.IsModuleRegisteredByAreaName("Test");

            Assert.IsFalse(isRegisteted);
        }
        public void Should_Find_Is_Module_Registered_By_AreaName()
        {
            var loader = new Mock<IAssemblyLoader>();
            loader
                .Setup(l => l.GetLoadableTypes(It.IsAny<Assembly>()))
                .Returns<Assembly>(r => new[] { typeof(SampleWebModuleDescriptor) });

            var service = new DefaultWebModulesRegistration(loader.Object, new Mock<IControllerExtensions>().Object);
            service.AddModuleDescriptorTypeFromAssembly(GetType().Assembly);
            service.InitializeModules();

            var sampleDescriptor = new SampleWebModuleDescriptor();

            var isRegisteted = service.IsModuleRegisteredByAreaName(sampleDescriptor.AreaName);
            Assert.IsTrue(isRegisteted);
        }