public UserService(IUserQueryRepository userQueryRepository, IUserCommandRepository userCommandRepository ) { _userQuery = userQueryRepository; _userCommand = userCommandRepository; }
public async Task Should_not_get_user_Repository_error_Should_return_repository_error_message() { logger.Setup(x => x.Log( It.IsAny <LogLevel>(), It.IsAny <EventId>(), It.IsAny <It.IsAnyType>(), It.IsAny <Exception>(), (Func <It.IsAnyType, Exception, string>)It.IsAny <object>())).Throws(new System.Exception("")); // Arrange const string USERDOCUMENT = "32893956858"; usuarioQueryService = new UserQueryRepository(new InMemoryMongoDbContext(true), logger.Object); // Act GetUserByDocumentResponse user = await usuarioQueryService.GetUserByDocumentAsync(USERDOCUMENT); // Assert logger.Verify(x => x.Log( It.IsAny <LogLevel>(), It.IsAny <EventId>(), It.IsAny <It.IsAnyType>(), It.IsAny <Exception>(), (Func <It.IsAnyType, Exception, string>)It.IsAny <object>())); Assert.NotEmpty(user.Errors); }
public UserService(IUnitOfWorks unitOfWorks, IUserRepository userRepository, IUserQueryRepository userQueryRepository, IJwtTokenHelper jwtTokenHelper, IEmailSender emailSender, ISecurityCodesRepository securityCodesRepository, IConfiguration configuration, GlobalSettings globalSettings, IHttpContextAccessor httpContextAccessor, IAddressRepository addressRepository, ISecurityCodeQueryRepository securityCodeQueryRepository, ISmsService smsService, IUserContext userContext) { _unitOfWorks = unitOfWorks; _userRepository = userRepository; _userQueryRepository = userQueryRepository; _jwtTokenHelper = jwtTokenHelper; _emailSender = emailSender; _securityCodesRepository = securityCodesRepository; _configuration = configuration; _globalSettings = globalSettings; _httpContextAccessor = httpContextAccessor; _addressRepository = addressRepository; _securityCodeQueryRepository = securityCodeQueryRepository; _smsService = smsService; _userContext = userContext; }
public PostService(IPostRepository postRepository, IPostQueryRepository postQueryRepository, IUnitOfWorks unitOfWorks, IMapper mapper, IUserContext userContext, IUserRepository userRepository, IFileService fileService, IHttpContextAccessor httpContextAccessor, ILikeRepository likeRepository, ILikeQueryRepository likeQueryRepository, GlobalSettings globalSettings, IUserQueryRepository userQueryRepository) { _postRepository = postRepository; _postQueryRepository = postQueryRepository; _unitOfWorks = unitOfWorks; _mapper = mapper; _userContext = userContext; _userRepository = userRepository; _fileService = fileService; _httpContextAccessor = httpContextAccessor; _likeRepository = likeRepository; _likeQueryRepository = likeQueryRepository; _globalSettings = globalSettings; _userQueryRepository = userQueryRepository; }
public UserService(IUserQueryRepository queryRepository, IUserCommandRepository commandRepository, ISignatureService signatureService) : base(queryRepository, commandRepository) { _queryRepository = queryRepository; _commandRepository = commandRepository; _signatureService = signatureService; }
public UserContext( ILocationFactory locationFactory, IPurchaseFactory purchaseFactory, IUserQueryRepository userQueryRepository) { PurchaseFactory = purchaseFactory; LocationFactory = locationFactory; UserQueryRepository = userQueryRepository; }
public TestService(IUserQueryRepository userQueryRepository, IUserCommandRepository userCommandRepository, IMapper mapper ) { _userQuery = userQueryRepository; _userCommand = userCommandRepository; _mapper = mapper; }
public UserService( IUserRepository userRepository, IUserQueryRepository userQueryRepository, IIndexService <UserModel> indexService, IUnitOfWork unitOfWork) { this.userRepository = userRepository; this.userQueryRepository = userQueryRepository; this.indexService = indexService; this.unitOfWork = unitOfWork; }
public async Task Should_get_user_With_valid_document_Must_return_user() { // Arrange const string USERDOCUMENT = "32893956858"; usuarioQueryService = new UserQueryRepository(new InMemoryMongoDbContext(true), logger.Object); // Act GetUserByDocumentResponse user = await usuarioQueryService.GetUserByDocumentAsync(USERDOCUMENT); // Assert Assert.Equal(USERDOCUMENT, user.Document); }
public async Task Should_not_get_user_With_valid_document_User_not_found_in_database() { // Arrange const string USERDOCUMENT = "45166568095"; usuarioQueryService = new UserQueryRepository(new InMemoryMongoDbContext(true), logger.Object); // Act GetUserByDocumentResponse user = await usuarioQueryService.GetUserByDocumentAsync(USERDOCUMENT); // Assert Assert.Null(user); }
public LikeService(ILikeRepository likeRepository, ILikeQueryRepository likeQueryRepository, IUserContext userContext, IUserQueryRepository userQueryRepository, IPostQueryRepository postQueryRepository, IUnitOfWorks unitOfWorks) { _likeRepository = likeRepository; _likeQueryRepository = likeQueryRepository; _userContext = userContext; _userQueryRepository = userQueryRepository; _postQueryRepository = postQueryRepository; _unitOfWorks = unitOfWorks; }
public AccountService(IMapper mapper, IPermissionQueryRepository permissionQueryRepository, IMenuQueryRepository menuQueryRepository, IUserQueryRepository userQueryRepository, IUserCommandRepository userCommandRepository, IUserRoleCommandRepository userRoleCommandRepository) { _mapper = mapper; _permissionQuery = permissionQueryRepository; _menuQuery = menuQueryRepository; _userQuery = userQueryRepository; _userCommand = userCommandRepository; _userRoleCommand = userRoleCommandRepository; }
public WishService( IIndexService <WishModel> indexService, IWishRepository wishRepository, IWishQueryRepository wishQueryRepository, IUserQueryRepository userQueryRepository, IProductQueryRepository productQueryRepository, IUnitOfWork unitOfWork) { this.wishRepository = wishRepository; this.indexService = indexService; this.wishQueryRepository = wishQueryRepository; this.userQueryRepository = userQueryRepository; this.productQueryRepository = productQueryRepository; this.unitOfWork = unitOfWork; }
public UserController(IUserQueryRepository userQueryRepository) { UserQueryRepository = userQueryRepository; }
public UsersController(IUserService userService, IUserQueryRepository userQueryServiceRepository) { this.userService = userService; this.userQueryServiceRepository = userQueryServiceRepository; }
public UserService(IUserCommandRepository command, IUserQueryRepository query, IMapper mapper, IConfiguration configuration) : base(command, query, mapper) { _configuration = configuration; }
public GetAllEmployeesQueryHandler(IMapper mapper, IUserQueryRepository userQueryRepository) { this._mapper = mapper; this._userQueryRepository = userQueryRepository; }
public UserQueryService(IUserQueryRepository userQueryRepository) { _userQueryRepository = userQueryRepository; }
public UserService(IUserRepository userRepository, IUserQueryRepository userQueryRepository, ICepApiService cepApiService) { this.userRepository = userRepository; this.userQueryRepository = userQueryRepository; this.cepApiService = cepApiService; }
public UserController(IUserQueryRepository userQueryRepository, IUserService userService) { this.userQueryRepository = userQueryRepository; this.userService = userService; }