Esempio n. 1
0
 public CreateCustomerHandlerTests()
 {
     _mapper        = new Mock <IMapper>();
     _customer      = _fixture.Create <Entity.Concrete.Customer>();
     _repository    = new Mock <IGenericRepository <Entity.Concrete.Customer> >();
     _createCommand = _fixture.Create <CreateCustomerCommand>();
     _sut           = new CreateCustomerCommandHandler(_repository.Object, _mapper.Object);
 }
Esempio n. 2
0
 public DeleteCustomerHandlerTests()
 {
     _customer      = _fixture.Create <Entity.Concrete.Customer>();
     _result        = new Mock <IResult>();
     _repository    = new Mock <IGenericRepository <Entity.Concrete.Customer> >();
     _deleteCommand = _fixture.Create <DeleteCustomerCommand>();
     _sut           = new DeleteCustomerCommandHandler(_repository.Object);
 }
Esempio n. 3
0
 public GetByIdCustomerHandlerTests()
 {
     _customer             = _fixture.Create <Entity.Concrete.Customer>();
     _customerIdQuery      = _fixture.Create <GetCustomerByIdQuery>();
     _customerResponse     = new Mock <GetCustomerByIdQueryResponse>();
     _customerDataResponse = new Mock <IDataResult <GetCustomerByIdQueryResponse> >();
     _mapper     = new Mock <IMapper>();
     _repository = new Mock <IGenericRepository <Entity.Concrete.Customer> >();
     _sut        = new GetCustomerByIdHandlers(_repository.Object, _mapper.Object);
 }