public void All_controllers_are_transient() { var nonTransientControllers = InstallerTestHelper.GetHandlersFor(typeof(IController), containerWithControllers) .Where(controller => controller.ComponentModel.LifestyleType != LifestyleType.Transient) .ToArray(); Assert.IsEmpty(nonTransientControllers); }
public void All_Repositories_are_transient() { var nonTransientRepositorys = InstallerTestHelper.GetHandlersFor(typeof(IRepository), containerWithRepositories) .Where(Repository => Repository.ComponentModel.LifestyleType != LifestyleType.Transient) .ToArray(); Assert.IsEmpty(nonTransientRepositorys); }
public void All_controllers_implement_IController() { var allHandlers = InstallerTestHelper.GetAllHandlers(containerWithControllers); var controllerHandlers = InstallerTestHelper.GetHandlersFor(typeof(IController), containerWithControllers); Assert.IsNotEmpty(allHandlers); Assert.AreEqual(allHandlers, controllerHandlers); }