From 57e4cdac01939c68b79b23f3e60f832b18003c57 Mon Sep 17 00:00:00 2001 From: dmolinari Date: Wed, 15 Apr 2026 13:03:18 -0300 Subject: [PATCH] chore(tests): limpia warning xUnit2012 en CreateUsuario_WithInactiveRol_Returns400 Reemplaza Assert.True(enumerable.Any(...)) por Assert.Contains idiomatico. --- tests/SIGCM2.Api.Tests/Usuarios/CreateUsuarioEndpointTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SIGCM2.Api.Tests/Usuarios/CreateUsuarioEndpointTests.cs b/tests/SIGCM2.Api.Tests/Usuarios/CreateUsuarioEndpointTests.cs index 0864609..1fa0570 100644 --- a/tests/SIGCM2.Api.Tests/Usuarios/CreateUsuarioEndpointTests.cs +++ b/tests/SIGCM2.Api.Tests/Usuarios/CreateUsuarioEndpointTests.cs @@ -421,7 +421,7 @@ public sealed class CreateUsuarioEndpointTests : IAsyncLifetime var json = await resp.Content.ReadFromJsonAsync(); Assert.True(json.TryGetProperty("errors", out var errors), "Response must contain 'errors'"); // Validation error should be on the Rol field - Assert.True(errors.EnumerateObject().Any(p => p.Name.Equals("Rol", StringComparison.OrdinalIgnoreCase))); + Assert.Contains(errors.EnumerateObject(), p => p.Name.Equals("Rol", StringComparison.OrdinalIgnoreCase)); } finally {