This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class OrderIntegrationTests : IAsyncLifetime | |
| { | |
| private CustomWebApplicationFactory _factory = null!; | |
| private HttpClient _httpClient = null!; | |
| public async Task InitializeAsync() | |
| { | |
| _factory = new CustomWebApplicationFactory(); | |
| _httpClient = _factory.GetHttpClient(); | |
| await Task.CompletedTask; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace DevTallesShop.Api.Tests.Integration; | |
| public class ProductIntegrationTests : IAsyncLifetime | |
| { | |
| private CustomWebApplicationFactory _factory = null!; | |
| private HttpClient _httpClient = null!; | |
| public async Task InitializeAsync() | |
| { | |
| _factory = new CustomWebApplicationFactory(); | |
| _httpClient = _factory.GetHttpClient(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CustomWebApplicationFactory : WebApplicationFactory<Program> | |
| { | |
| protected override void ConfigureWebHost(IWebHostBuilder builder) | |
| { | |
| base.ConfigureWebHost(builder); | |
| builder.ConfigureServices(services => | |
| { | |
| // Aqu铆 podr铆amos remover o reemplazar servicios si fuera necesario | |
| // Por ejemplo, si tuvi茅ramos una base de datos real, podr铆amos usar SQLite en memoria para tests | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void GetAllOrders_ReturnsOkWithJoinedData() | |
| { | |
| var orders = new[] | |
| { | |
| new Order(1, DateTime.UtcNow.AddHours(-2), 30m, 1, 1, 2), | |
| new Order(2, DateTime.UtcNow.AddHours(-1), 120m, 2, 3, 1) | |
| }; | |
| var customers = new[] | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void GetAll_ReturnsAllOrders() | |
| {} | |
| [Fact] | |
| public void GetAll_ReturnsOrdersWithCompleteData() | |
| {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void GetAllCustomers_ReturnsOkWithCustomers() | |
| {} | |
| [Fact] | |
| public void GetCustomerById_ReturnsOk_WhenExists() | |
| {} | |
| [Fact] | |
| public void GetCustomerById_ReturnsNotFound_WhenCustomerDoesNotExist() | |
| {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void GetAll_ReturnsAllCustomers() | |
| {} | |
| [Fact] | |
| public void GetById_ReturnsCustomer_WhenExists() | |
| {} | |
| [Fact] | |
| public void GetById_ReturnsNull_WhenCustomerNotFound() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact(Skip = "Pendiente de implementaci贸n")] | |
| public void GetAllProducts_ReturnsOkWithProducts() | |
| {} | |
| [Fact(Skip = "Pendiente de implementaci贸n")] | |
| public void GetProductById_ReturnsOKWhithProduct() | |
| {} | |
| [Fact(Skip = "Pendiente de implementaci贸n")] | |
| public void GetProductById_ReturnsNotFound_WhenProductDoesNotExist() | |
| {} | |
| [Fact(Skip = "Pendiente de implementaci贸n")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void Create_ShouldAddProductWithIncrementalId() | |
| {} | |
| [Fact] | |
| public void Update_ShouldPersistChanges_WhenProductExists() | |
| {} | |
| [Fact] |
NewerOlder