Skip to content

Instantly share code, notes, and snippets.

@pazteddy
Last active December 13, 2025 15:43
Show Gist options
  • Select an option

  • Save pazteddy/4b7e617098580cefcc4dbdacff997189 to your computer and use it in GitHub Desktop.

Select an option

Save pazteddy/4b7e617098580cefcc4dbdacff997189 to your computer and use it in GitHub Desktop.
Pruebas de integración para Customers con WebApplicationFactory
public class CustomerIntegrationTests : IAsyncLifetime
{
private CustomWebApplicationFactory _factory = null!;
private HttpClient _httpClient = null!;
public async Task InitializeAsync()
{
_factory = new CustomWebApplicationFactory();
_httpClient = _factory.GetHttpClient();
await Task.CompletedTask;
}
public async Task DisposeAsync()
{
_httpClient?.Dispose();
await _factory.DisposeAsync();
}
[Fact(DisplayName = "GET /customers debe retornar 200 OK con lista de clientes", Skip = "Falta implementación")]
public async Task GetAllCustomers_ReturnsOkWithList()
{
}
[Fact(DisplayName = "GET /customers debe validar estructura JSON correcta", Skip = "Falta implementación")]
public async Task GetAllCustomers_ValidatesJsonStructure()
{
}
[Fact(DisplayName = "GET /customers/{id} debe retornar 200 OK cuando existe", Skip = "Falta implementación")]
public async Task GetCustomerById_ReturnsOkWhenExists()
{
}
[Fact(DisplayName = "GET /customers/{id} valida propiedades del objeto JSON", Skip = "Falta implementación")]
public async Task GetCustomerById_ValidatesJsonPayload()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment