chore(tests): dotnet format sobre archivos pre-existentes (surfaced durante CAT-001)

Fix mecánico de whitespace detectado por dotnet format --verify-no-changes durante la verify phase de CAT-001 (PR #30). Sin cambios funcionales.
This commit is contained in:
2026-04-18 20:56:23 -03:00
parent 8353f73230
commit 9957724c40
13 changed files with 110 additions and 102 deletions

View File

@@ -20,7 +20,7 @@ public sealed class FiscalControllerTests : IAsyncLifetime
private const string TestConnectionString =
"Server=TECNICA3;Database=SIGCM2_Test;User Id=desarrollo;Password=desarrollo2026;TrustServerCertificate=True;";
private const string IvaEndpoint = "/api/v1/admin/fiscal/iva";
private const string IvaEndpoint = "/api/v1/admin/fiscal/iva";
private const string IibbEndpoint = "/api/v1/admin/fiscal/iibb";
private const string AdminUsername = "admin";
private const string AdminPassword = "@Diego550@";

View File

@@ -44,7 +44,7 @@ public sealed class PermisoResolverTests
Assert.DoesNotContain("A", result);
Assert.Contains("B", result);
Assert.Equal(1, result.Count);
Assert.Single(result);
}
// R-04: Grant duplicado (ya en rol) → idempotente, no duplicados

View File

@@ -66,10 +66,10 @@ public class TempPasswordGeneratorTests
{
var pwd = TempPasswordGenerator.Generate(12);
Assert.True(pwd.Length >= 12);
Assert.True(pwd.Any(char.IsUpper));
Assert.True(pwd.Any(char.IsLower));
Assert.True(pwd.Any(char.IsDigit));
Assert.True(pwd.Any(c => symbols.Contains(c)));
Assert.Contains(pwd, char.IsUpper);
Assert.Contains(pwd, char.IsLower);
Assert.Contains(pwd, char.IsDigit);
Assert.Contains(pwd, c => symbols.Contains(c));
}
}

View File

@@ -154,9 +154,17 @@ public sealed class JsonSanitizerTests
var input = new
{
password = "1", passwordHash = "2", token = "3", refreshToken = "4",
accessToken = "5", cvv = "6", card = "7", cardNumber = "8",
secret = "9", apiKey = "10", privateKey = "11",
password = "1",
passwordHash = "2",
token = "3",
refreshToken = "4",
accessToken = "5",
cvv = "6",
card = "7",
cardNumber = "8",
secret = "9",
apiKey = "10",
privateKey = "11",
keep = "yes",
};

View File

@@ -30,8 +30,8 @@ public class AssignPermisosToRolCommandHandlerTests
public async Task Handle_HappyPath_CallsReplaceWithCorrectIds()
{
_rolRepository.GetByCodigoAsync("cajero").Returns(MakeRol(5, "cajero"));
var permisoCrear = MakePermiso(1, "ventas:contado:crear");
var permisoFact = MakePermiso(2, "ventas:contado:facturar");
var permisoCrear = MakePermiso(1, "ventas:contado:crear");
var permisoFact = MakePermiso(2, "ventas:contado:facturar");
_permisoRepository.GetByCodigosAsync(Arg.Any<IEnumerable<string>>())
.Returns(new List<Permiso> { permisoCrear, permisoFact });

View File

@@ -42,7 +42,7 @@ public class ListTiposDeIvaQueryHandlerTests
var result = await _handler.Handle(new ListTiposDeIvaQuery(1, 10, null, null));
Assert.Equal(0, result.Items.Count);
Assert.Empty(result.Items);
Assert.Equal(0, result.Total);
}

View File

@@ -23,7 +23,7 @@ public sealed class TestWebAppFactory : WebApplicationFactory<Program>, IAsyncLi
// Resolved once — absolute paths independent of working directory
private static readonly string RepoRoot = ResolveRepoRoot();
private static readonly string PrivateKeyPath = Path.Combine(RepoRoot, "src", "api", "SIGCM2.Api", "keys", "private.pem");
private static readonly string PublicKeyPath = Path.Combine(RepoRoot, "src", "api", "SIGCM2.Api", "keys", "public.pem");
private static readonly string PublicKeyPath = Path.Combine(RepoRoot, "src", "api", "SIGCM2.Api", "keys", "public.pem");
private readonly SqlTestFixture _dbFixture = new(TestConnectionString);
@@ -36,17 +36,17 @@ public sealed class TestWebAppFactory : WebApplicationFactory<Program>, IAsyncLi
// This ensures our paths win over appsettings.json
config.AddInMemoryCollection(new Dictionary<string, string?>
{
["ConnectionStrings:SqlServer"] = TestConnectionString,
["Jwt:Issuer"] = "sigcm2.api",
["Jwt:Audience"] = "sigcm2.web",
["Jwt:AccessTokenMinutes"] = "60",
["Jwt:RefreshTokenDays"] = "7",
["Jwt:PrivateKeyPath"] = PrivateKeyPath,
["Jwt:PublicKeyPath"] = PublicKeyPath,
["Jwt:PrivateKey"] = null,
["Jwt:PublicKey"] = null,
["Cors:AllowedOrigins:0"] = "http://localhost:5173",
["Serilog:MinimumLevel:Default"] = "Warning",
["ConnectionStrings:SqlServer"] = TestConnectionString,
["Jwt:Issuer"] = "sigcm2.api",
["Jwt:Audience"] = "sigcm2.web",
["Jwt:AccessTokenMinutes"] = "60",
["Jwt:RefreshTokenDays"] = "7",
["Jwt:PrivateKeyPath"] = PrivateKeyPath,
["Jwt:PublicKeyPath"] = PublicKeyPath,
["Jwt:PrivateKey"] = null,
["Jwt:PublicKey"] = null,
["Cors:AllowedOrigins:0"] = "http://localhost:5173",
["Serilog:MinimumLevel:Default"] = "Warning",
});
});