public void it_does_not_have_the_factory_should_throw_an_exception() { created_exception = new Exception(); missing_dependency_error_handler = x => { Assert.AreEqual(x, typeof(IDbConnection)); return created_exception; }; factories = new DependecyFactories(all_the_factories, missing_dependency_error_handler); factories.get_factory_to_create(typeof (IDbConnection)); }
public void it_does_not_have_the_factory_should_throw_an_exception() { created_exception = new Exception(); missing_dependency_error_handler = x => { Assert.AreEqual(x, typeof(IDbConnection)); return(created_exception); }; factories = new DependecyFactories(all_the_factories, missing_dependency_error_handler); factories.get_factory_to_create(typeof(IDbConnection)); }
public DependecyFactories(IDictionary <Type, ICreateOneDependency> all_the_factories, ICreateTheExceptionForAMissingDependencyFactory missing_dependency_error_handler) { this.all_the_factories = all_the_factories; this.missing_dependency_error_handler = missing_dependency_error_handler; }
public void setup() { factory = MockRepository.GenerateMock<ICreateOneDependency>(); missing_dependency_error_handler = MockRepository.GenerateMock<ICreateTheExceptionForAMissingDependencyFactory>(); all_the_factories = new Dictionary<Type, ICreateOneDependency>(); }
public DependecyFactories(IDictionary<Type, ICreateOneDependency> all_the_factories, ICreateTheExceptionForAMissingDependencyFactory missing_dependency_error_handler) { this.all_the_factories = all_the_factories; this.missing_dependency_error_handler = missing_dependency_error_handler; }
public void setup() { factory = MockRepository.GenerateMock <ICreateOneDependency>(); missing_dependency_error_handler = MockRepository.GenerateMock <ICreateTheExceptionForAMissingDependencyFactory>(); all_the_factories = new Dictionary <Type, ICreateOneDependency>(); }