public void ShowLastServicesDetailsTest() { mockRepository.Setup(x => x.ShowLastServicesDetails()) .Returns(listaServiceDetailsDTO.Take(3)); var handler = new ShowLastServicesDetailsHandler(mockRepository.Object); // Act ShowLastServicesDetails sld = new ShowLastServicesDetails(); var res = handler.Handle(sld, ct); Assert.IsNotNull(res.Result); }
public Task <IEnumerable <ServiceDetailsDTO> > Handle(ShowLastServicesDetails request, CancellationToken cancellationToken) { return(Task.Run(() => { return serviceDetailsRepository.ShowLastServicesDetails(); })); }