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);
        }
예제 #3
0
        public EntriesController(IEntryManagementService entryManagementService)
        {
            Check.Require(entryManagementService != null, "entryManagementService may not be null");

            this.entryManagementService = entryManagementService;
        }