public void Startup() { _unitOfWork = A.Fake <IUnitOfWork>(); _userPrincipalProvider = A.Fake <IUserPrincipalProvider>(); _activeDirectoryPrincipalProvider = A.Fake <IActiveDirectoryPrincipal>(); A.CallTo(() => _userPrincipalProvider.CurrentUserName).Returns("user"); _handler = new AddAssessmentCommandHandler(_unitOfWork, _activeDirectoryPrincipalProvider, _userPrincipalProvider); }
public AddAssessmentCommandHandler(IUnitOfWork unitOfWork, IActiveDirectoryPrincipal activeDirectoryPrincipal, IUserPrincipalProvider userPrincipalProvider) { _unitOfWork = unitOfWork; _userPrincipalProvider = userPrincipalProvider; _activeDirectoryPrincipal = activeDirectoryPrincipal; }