Example #1
0
 private AdminController CreateControllerUnderTest()
 {
     _fakeUnitOfWorkFactory = Substitute.For <IUnitOfWorkFactory>();
     _fakeAdminCurrentSessionOfExpertsService = Substitute.For <IAdminCurrentSessionService>();
     FakeCurrentSessionOfExpertsService       = _fakeAdminCurrentSessionOfExpertsService;
     _fakeLogService = Substitute.For <LogService>();
     return(new AdminController(_fakeUnitOfWorkFactory, _fakeAdminCurrentSessionOfExpertsService, _fakeLogService));
 }
Example #2
0
        public AdminController(
            [NotNull] IUnitOfWorkFactory unitOfWorkFactory,
            [NotNull] IAdminCurrentSessionService currentSessionOfExpertsService,
            [NotNull] LogService logService)
            : base(unitOfWorkFactory, currentSessionOfExpertsService, logService)
        {
            if (currentSessionOfExpertsService == null)
            {
                throw new ArgumentNullException(nameof(currentSessionOfExpertsService));
            }
            if (logService == null)
            {
                throw new ArgumentNullException(nameof(logService));
            }

            _currentSessionOfExpertsService = currentSessionOfExpertsService;
        }