private ExpertController CreateControllerUnderTest() { SubstituteAutoConverter.Substitute(); _fakeLogService = Substitute.For <LogService>(); _fakeTypeQuery = Substitute.For <IGetNotionTypesQuery <NotionTypeViewModel> >(); _fakeUnitOfWorkFactory = Substitute.For <IUnitOfWorkFactory>(); _fakeExpertCurrentSessionOfExpertsService = Substitute.For <IExpertCurrentSessionService>(); FakeCurrentSessionOfExpertsService = _fakeExpertCurrentSessionOfExpertsService; return(new ExpertController( _fakeUnitOfWorkFactory, _fakeExpertCurrentSessionOfExpertsService, _fakeTypeQuery, _fakeLogService)); }
public ExpertController( [NotNull] IUnitOfWorkFactory unitOfWorkFactory, [NotNull] IExpertCurrentSessionService currentSessionOfExpertsService, [NotNull] IGetNotionTypesQuery <NotionTypeViewModel> notionTypeQuery, [NotNull] LogService logService) : base(unitOfWorkFactory, currentSessionOfExpertsService, logService) { if (currentSessionOfExpertsService == null) { throw new ArgumentNullException(nameof(currentSessionOfExpertsService)); } if (notionTypeQuery == null) { throw new ArgumentNullException(nameof(notionTypeQuery)); } if (logService == null) { throw new ArgumentNullException(nameof(logService)); } _currentSessionOfExpertsService = currentSessionOfExpertsService; _notionTypeQuery = notionTypeQuery; }