public void SetUp() { ServiceLocatorInitializer.Init(); entryManagementService = MockRepository.GenerateMock<IEntryManagementService>(); entriesController = new EntriesController(entryManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); entryRepository = MockRepository.GenerateMock<IEntryRepository>(); entryRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock<IDbContext>()); entryManagementService = new EntryManagementService(entryRepository); }
public EntriesController(IEntryManagementService entryManagementService) { Check.Require(entryManagementService != null, "entryManagementService may not be null"); this.entryManagementService = entryManagementService; }