public Task <IEnumerable <ServiceDTO> > Handle(ShowServices request, CancellationToken cancellationToken) { return(Task.Run(() => { return serviceRepository.ShowServices(); })); }
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); }
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); }