Ejemplo n.º 1
0
        public AccountQueryProcessorTests()
        {
            _random = new Random();

            _unitOfWorkMock = new Mock <IUnitOfWork>();
            _userList       = new List <UserEntity>();
            _unitOfWorkMock.Setup(x => x.Query <UserEntity>())
            .Returns(() => _userList.AsQueryable());

            _tokenBuilderMock       = new Mock <ITokenBuilder>(MockBehavior.Strict);
            _userQueryProcessorMock = new Mock <IUserQueryProcessor>();
            _securityContextMock    = new Mock <ISecurityContext>(MockBehavior.Strict);

            _accountQueryProcessor = new AccountQueryProcessor(_unitOfWorkMock.Object, _tokenBuilderMock.Object, _userQueryProcessorMock.Object, _securityContextMock.Object);
        }
 public AccountsController(IAccountQueryProcessor accountQuery, IAutoMapper mapper)
 {
     _accountQuery = accountQuery;
     _mapper       = mapper;
 }
 public AccountsController(IAccountQueryProcessor queryProcessor, ITransactionCommandProcessor commandProcessor)
 {
     _queryProcessor   = queryProcessor;
     _commandProcessor = commandProcessor;
 }