diff --git a/Tests/AuthTests.cs b/Tests/AuthTests.cs index 88454dd..4bd15aa 100644 --- a/Tests/AuthTests.cs +++ b/Tests/AuthTests.cs @@ -17,6 +17,7 @@ public async Task RegisterLogInLogOut() var registerUserDto = GenerateRandomRegisterUserDto(); await ws.DoAndAssert(new ClientWantsToSignUpDto { RegisterUserDto = registerUserDto }, receivedMessages => { + receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerSignsUserUp)) == 1; }); @@ -28,11 +29,13 @@ await ws.DoAndAssert(new ClientWantsToSignUpDto { RegisterUserDto = registerUser await ws.DoAndAssert(new ClientWantsToLogInDto { LoginDto = loginDto }, receivedMessages => { + receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerAuthenticatesUser)) == 1; }); await ws.DoAndAssert(new ClientWantsToLogOutDto { UserEmail = registerUserDto.Email }, receivedMessages => { + receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerLogsOutUser)) == 1; }); } @@ -107,7 +110,6 @@ public async Task LogInInvalidCredentials() await ws.DoAndAssert(new ClientWantsToLogInDto { LoginDto = loginDto }, receivedMessages => { - receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerAuthenticatesUser)) == 0 && receivedMessages.Count(e => e.eventType == nameof(ServerRejectsWrongCredentials)) == 1; }); diff --git a/Tests/PlantTests.cs b/Tests/PlantTests.cs index 2d4feb7..6dc1ab1 100644 --- a/Tests/PlantTests.cs +++ b/Tests/PlantTests.cs @@ -21,6 +21,7 @@ public async Task CreatePlant() await webSocketTestClient.DoAndAssert(new ClientWantsToCreatePlantDto { CreatePlantDto = createPlantDto, Jwt = jwt }, receivedMessages => { + receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerSendsPlant)) == 1; }); @@ -32,6 +33,7 @@ await webSocketTestClient.DoAndAssert(new ClientWantsAllPlantsDto PageSize = 10 }, receivedMessages => { + receivedMessages.ForEach(e => Console.WriteLine(e.eventType)); return receivedMessages.Count(e => e.eventType == nameof(ServerSendsAllPlants)) == 1; }); }