public Task <IEnumerable <ServiceDTO> > Handle(ShowServices request, CancellationToken cancellationToken)
 {
     return(Task.Run(() =>
     {
         return serviceRepository.ShowServices();
     }));
 }
Esempio n. 2
0
        private void ShowServices_Click(object sender, EventArgs e)
        {
            RemoveControls();
            ShowServices serv = new ShowServices();

            serv.ShowServiceButtonClicked -= ShowServiceDetails;
            serv.ShowServiceButtonClicked += ShowServiceDetails;
            ShowIcons("services");
            contentPanel.Controls.Add(serv);
        }
Esempio n. 3
0
        public void ShowServicesTest()
        {
            mockRepository.Setup(x => x.ShowServices()).Returns(listaServiceDTO);

            var          handler = new ShowServiceHandler(mockRepository.Object);
            ShowServices ss      = new ShowServices();
            var          res     = handler.Handle(ss, ct);

            Assert.IsNotNull(res.Result);
        }