예제 #1
0
 public AnagramsController(ICookiesHandlerService cookiesHandler, IWordService wordService,
                           IUserLogService userLogService, AnagramSolverCodeFirstContext context)
 {
     _cookiesHandler = cookiesHandler;
     _wordService    = wordService;
     _userLogService = userLogService;
     _context        = context;
 }
예제 #2
0
 public HomeController(IAnagramSolver anagramSolver, ICookiesHandlerService cookiesHandler,
                       IUserLogService logService, ISearchHistoryService searchHistoryService,
                       AnagramSolverCodeFirstContext context)
 {
     _anagramSolver        = anagramSolver;
     _cookiesHandler       = cookiesHandler;
     _userLogService       = logService;
     _searchHistoryService = searchHistoryService;
     _context = context;
 }
예제 #3
0
        public void Setup()
        {
            _anagramSolverMock         = Substitute.For <IAnagramSolver>();
            _cookiesHandlerServiceMock = Substitute.For <ICookiesHandlerService>();
            _userLogServiceMock        = Substitute.For <IUserLogService>();
            _searchHistoryServiceMock  = Substitute.For <ISearchHistoryService>();
            _contextMock = Substitute.For <AnagramSolverCodeFirstContext>();

            _controller = new HomeController(_anagramSolverMock, _cookiesHandlerServiceMock,
                                             _userLogServiceMock, _searchHistoryServiceMock, _contextMock);
        }
        public void Setup()
        {
            _cookiesHandlerServiceMock = Substitute.For <ICookiesHandlerService>();
            _userLogServiceMock        = Substitute.For <IUserLogService>();
            _wordServiceMock           = Substitute.For <IWordService>();
            _contextMock = Substitute.For <AnagramSolverCodeFirstContext>();

            _controller = new AnagramsController(
                _cookiesHandlerServiceMock, _wordServiceMock, _userLogServiceMock, _contextMock);

            _anagram = new Anagram()
            {
                Word = "word1", ID = 1, Category = "cat"
            };
            _anagramsList = new List <Anagram>()
            {
                _anagram
            };
        }
예제 #5
0
 public void Setup()
 {
     _httpContextMock       = Substitute.For <IHttpContextAccessor>();
     _cookiesHandlerService = new CookiesHandlerService(_httpContextMock);
 }