public void ShowServicesByLowCostTest()
        {
            mockRepository.Setup(x => x.ShowServicesByLowCost())
            .Returns(listaServiceDetailsDTO.OrderByDescending(y => y.Cost));

            var handler = new ShowServicesByLowCostHandler(mockRepository.Object);

            // Act
            ShowServicesByLowCost ssblc = new ShowServicesByLowCost();

            var res = handler.Handle(ssblc, ct);

            Assert.IsNotNull(res.Result);
        }
Exemplo n.º 2
0
 public Task <IEnumerable <ServiceDetailsDTO> > Handle(ShowServicesByLowCost request, CancellationToken cancellationToken)
 {
     return(Task.Run(() => {
         return serviceDetailsRepository.ShowServicesByLowCost();
     }));
 }