コード例 #1
0
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            controller = new TasksController(
                CreateMockTaskRepository(),
                MockRepository.GenerateMock<IUserRepository>(),
                TipsControllerTests.CreateMockTipRepository(),
                CodesControllerTests.CreateMockCodeRepository());

            testContext = new ControllerTestContext(controller);
            user = new User { Game = new Game() };
        }
コード例 #2
0
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            controller = new GamesController(
                CreateMockGameRepository(),
                MockRepository.GenerateMock<IUserRepository>(),
                MockRepository.GenerateMock<IGameService>());
            testContext = new ControllerTestContext(controller);

            user = new User {Game = new Game()};
        }