public GarcomQueryHandler( IGarcomDapper clienteDapper, IMediator mediator, IGarcomRepository garcomRepository ) { _clienteDapper = clienteDapper; _mediator = mediator; _garcomRepository = garcomRepository; }
public GarcomQueryHandlerTest() { var dapperMoq = new Mock <IGarcomDapper>(); dapperMoq .Setup(x => x.ObterGarcons(It.IsAny <int>(), It.IsAny <int>())) .ReturnsAsync((new List <GarcomDto>() { new GarcomDto() })); var mediatorMoq = new Mock <IMediator>(); mediatorMoq .Setup(x => x.Publish(It.IsAny <object>(), It.IsAny <CancellationToken>())) .Returns(Task.CompletedTask); _mediator = mediatorMoq.Object; _garcomDapper = dapperMoq.Object; }