public EFDataGenerator(TestModel context) { _context = context; _entityDeleteActions = new List<Action<TestModel>>(); }
public void SetUp() { EFUnitOfWorkFactory.SetObjectContextProvider(() => { var context = new TestModel(); return context; }); var locator = MockRepository.GenerateStub<IServiceLocator>(); locator.Stub(x => x.GetInstance<IUnitOfWorkFactory>()) .Return(new EFUnitOfWorkFactory()).Repeat.Any(); ServiceLocator.SetLocatorProvider(() => locator); }