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:
@@ -53,12 +53,12 @@ public sealed class FiscalController : ControllerBase
|
||||
IValidator<UpdateIngresosBrutosCommand> updateIibbValidator,
|
||||
IValidator<NuevaVersionIngresosBrutosCommand> nuevaVersionIibbValidator)
|
||||
{
|
||||
_dispatcher = dispatcher;
|
||||
_createIvaValidator = createIvaValidator;
|
||||
_updateIvaValidator = updateIvaValidator;
|
||||
_dispatcher = dispatcher;
|
||||
_createIvaValidator = createIvaValidator;
|
||||
_updateIvaValidator = updateIvaValidator;
|
||||
_nuevaVersionIvaValidator = nuevaVersionIvaValidator;
|
||||
_createIibbValidator = createIibbValidator;
|
||||
_updateIibbValidator = updateIibbValidator;
|
||||
_createIibbValidator = createIibbValidator;
|
||||
_updateIibbValidator = updateIibbValidator;
|
||||
_nuevaVersionIibbValidator = nuevaVersionIibbValidator;
|
||||
}
|
||||
|
||||
@@ -78,15 +78,15 @@ public sealed class FiscalController : ControllerBase
|
||||
[FromQuery] bool? activo = null,
|
||||
[FromQuery] string? codigo = null)
|
||||
{
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (pageSize < 1) return BadRequest(new { error = "pageSize must be >= 1" });
|
||||
|
||||
var query = new ListTiposDeIvaQuery(page, pageSize, activo, codigo);
|
||||
var query = new ListTiposDeIvaQuery(page, pageSize, activo, codigo);
|
||||
var result = await _dispatcher.Send<ListTiposDeIvaQuery, PagedResult<TipoDeIvaDto>>(query);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIvaResponse).ToList(),
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIvaResponse).ToList(),
|
||||
result.Page,
|
||||
result.PageSize,
|
||||
result.Total
|
||||
@@ -102,7 +102,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> GetIvaById([FromRoute] int id)
|
||||
{
|
||||
var query = new GetTipoDeIvaByIdQuery(id);
|
||||
var query = new GetTipoDeIvaByIdQuery(id);
|
||||
var result = await _dispatcher.Send<GetTipoDeIvaByIdQuery, TipoDeIvaDto>(query);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetHistorialIva([FromRoute] int id)
|
||||
{
|
||||
var query = new GetHistorialTipoDeIvaQuery(id);
|
||||
var query = new GetHistorialTipoDeIvaQuery(id);
|
||||
var result = await _dispatcher.Send<GetHistorialTipoDeIvaQuery, IReadOnlyList<HistorialCadenaDto>>(query);
|
||||
return Ok(result.Select(FiscalContractMapper.ToHistorialIvaResponse).ToList());
|
||||
}
|
||||
@@ -143,10 +143,10 @@ public sealed class FiscalController : ControllerBase
|
||||
}
|
||||
|
||||
var command = new CreateTipoDeIvaCommand(
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Porcentaje: request.Porcentaje ?? 0m,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Porcentaje: request.Porcentaje ?? 0m,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
VigenciaDesde: vigenciaDesde.Value,
|
||||
VigenciaHasta: vigenciaHasta);
|
||||
|
||||
@@ -202,11 +202,11 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "Request body is required" });
|
||||
|
||||
var command = new UpdateTipoDeIvaCommand(
|
||||
Id: id,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Id: id,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Activo: request.Activo ?? true);
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Activo: request.Activo ?? true);
|
||||
|
||||
var validation = await _updateIvaValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -239,9 +239,9 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "vigenciaDesde must be a valid date (yyyy-MM-dd)" });
|
||||
|
||||
var command = new NuevaVersionTipoDeIvaCommand(
|
||||
PredecesoraId: id,
|
||||
PredecesoraId: id,
|
||||
NuevoPorcentaje: request.Porcentaje ?? 0m,
|
||||
VigenciaDesde: vigenciaDesde.Value);
|
||||
VigenciaDesde: vigenciaDesde.Value);
|
||||
|
||||
var validation = await _nuevaVersionIvaValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -269,7 +269,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> DeactivateIva([FromRoute] int id)
|
||||
{
|
||||
var command = new DeactivateTipoDeIvaCommand(id);
|
||||
var result = await _dispatcher.Send<DeactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
var result = await _dispatcher.Send<DeactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> ReactivateIva([FromRoute] int id)
|
||||
{
|
||||
var command = new ReactivateTipoDeIvaCommand(id);
|
||||
var result = await _dispatcher.Send<ReactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
var result = await _dispatcher.Send<ReactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[FromQuery] bool? activo = null,
|
||||
[FromQuery] string? provincia = null)
|
||||
{
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (pageSize < 1) return BadRequest(new { error = "pageSize must be >= 1" });
|
||||
|
||||
ProvinciaArgentina? provinciaEnum = null;
|
||||
@@ -314,12 +314,12 @@ public sealed class FiscalController : ControllerBase
|
||||
provinciaEnum = parsed;
|
||||
}
|
||||
|
||||
var query = new ListIngresosBrutosQuery(page, pageSize, activo, provinciaEnum);
|
||||
var query = new ListIngresosBrutosQuery(page, pageSize, activo, provinciaEnum);
|
||||
var result = await _dispatcher.Send<ListIngresosBrutosQuery, PagedResult<IngresosBrutosDto>>(query);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIibbResponse).ToList(),
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIibbResponse).ToList(),
|
||||
result.Page,
|
||||
result.PageSize,
|
||||
result.Total
|
||||
@@ -335,7 +335,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> GetIibbById([FromRoute] int id)
|
||||
{
|
||||
var query = new GetIngresosBrutosByIdQuery(id);
|
||||
var query = new GetIngresosBrutosByIdQuery(id);
|
||||
var result = await _dispatcher.Send<GetIngresosBrutosByIdQuery, IngresosBrutosDto>(query);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetHistorialIibb([FromRoute] int id)
|
||||
{
|
||||
var query = new GetHistorialIngresosBrutosQuery(id);
|
||||
var query = new GetHistorialIngresosBrutosQuery(id);
|
||||
var result = await _dispatcher.Send<GetHistorialIngresosBrutosQuery, IReadOnlyList<HistorialCadenaIibbDto>>(query);
|
||||
return Ok(result.Select(FiscalContractMapper.ToHistorialIibbResponse).ToList());
|
||||
}
|
||||
@@ -397,9 +397,9 @@ public sealed class FiscalController : ControllerBase
|
||||
}
|
||||
|
||||
var command = new CreateIngresosBrutosCommand(
|
||||
Provincia: provinciaEnum,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Alicuota: request.Alicuota ?? 0m,
|
||||
Provincia: provinciaEnum,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Alicuota: request.Alicuota ?? 0m,
|
||||
VigenciaDesde: vigenciaDesde.Value,
|
||||
VigenciaHasta: vigenciaHasta);
|
||||
|
||||
@@ -453,9 +453,9 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "Request body is required" });
|
||||
|
||||
var command = new UpdateIngresosBrutosCommand(
|
||||
Id: id,
|
||||
Id: id,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Activo: request.Activo ?? true);
|
||||
Activo: request.Activo ?? true);
|
||||
|
||||
var validation = await _updateIibbValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -518,7 +518,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> DeactivateIibb([FromRoute] int id)
|
||||
{
|
||||
var command = new DeactivateIngresosBrutosCommand(id);
|
||||
var result = await _dispatcher.Send<DeactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
var result = await _dispatcher.Send<DeactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> ReactivateIibb([FromRoute] int id)
|
||||
{
|
||||
var command = new ReactivateIngresosBrutosCommand(id);
|
||||
var result = await _dispatcher.Send<ReactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
var result = await _dispatcher.Send<ReactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user