From 80d707c1be82a791cc698de533e6498fda7a2b3a Mon Sep 17 00:00:00 2001 From: Angelo Santos Date: Mon, 8 Jul 2024 14:35:57 -0300 Subject: [PATCH] finished --- .../QueriesTests/ClientQueryServiceTest.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/XPhone/XPhone.Tests/QueriesTests/ClientQueryServiceTest.cs b/XPhone/XPhone.Tests/QueriesTests/ClientQueryServiceTest.cs index b555c1a..d9cad6c 100644 --- a/XPhone/XPhone.Tests/QueriesTests/ClientQueryServiceTest.cs +++ b/XPhone/XPhone.Tests/QueriesTests/ClientQueryServiceTest.cs @@ -15,7 +15,6 @@ public class ClientQueryServiceTests [Fact] public async Task GetAllClientsAsync_ReturnsAllClients() { - var mockClientRepository = new Mock(); var clients = new List { @@ -28,10 +27,21 @@ public async Task GetAllClientsAsync_ReturnsAllClients() var result = await queryService.GetAllClientsAsync(); + + Assert.Equal(clients.Count, result.Count); - Assert.Equal(clients, result); + for (int i = 0; i < clients.Count; i++) + { + Assert.Equal(clients[i].Id, result[i].Id); + Assert.Equal(clients[i].Name, result[i].Name); + Assert.Equal(clients[i].Phone, result[i].Phone); + Assert.Equal(clients[i].Fine, result[i].Fine); + Assert.Equal(clients[i].FineAmount, result[i].FineAmount); + + } } + [Fact] public async Task GetClientByIdAsync_ExistingClient_ReturnsClientDTO() {