Skip to content

feat: add Venta CRUD module with tests and security validation#24

Merged
edelomeza merged 1 commit into
mainfrom
Venta
Jul 15, 2026
Merged

feat: add Venta CRUD module with tests and security validation#24
edelomeza merged 1 commit into
mainfrom
Venta

Conversation

@edelomeza

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

var httpClient = new HttpClient(mockHandler) { BaseAddress = new Uri(TestConstants.ApiBaseUrl) };

var httpContextAccessorMock = new Mock<IHttpContextAccessor>();
httpContextAccessorMock.Setup(x => x.HttpContext).Returns((HttpContext?)null);
{
private static WebApplicationFactory<Program> CreateFactory()
{
return new WebApplicationFactory<Program>()

serviceMock
.Setup(x => x.GetVentasAsync(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<CancellationToken>()))
.ReturnsAsync((PaginatedResponse<Venta>?)null);

serviceMock
.Setup(x => x.GetVentasAsync(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<CancellationToken>()))
.ReturnsAsync((PaginatedResponse<Venta>?)null);
Comment on lines +195 to +199
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error autocomplete clientes");
return [];
}
Comment on lines +103 to +107
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error fetching estado venta {Id}", id);
return null;
}
Comment on lines +134 to +138
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error autocomplete usuarios");
return [];
}
Comment on lines +58 to +62
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error fetching ventas");
return null;
}
Comment on lines +115 to +119
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error searching ventas");
return null;
}
Comment on lines +169 to +173
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error creating venta");
return OperationResult.Fail("Error inesperado. Intente nuevamente.");
}
@edelomeza
edelomeza merged commit 302ecd8 into main Jul 15, 2026
10 checks passed
@edelomeza
edelomeza deleted the Venta branch July 16, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants