This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using LiteCharms.Features.TechShop.Products;
|
||||
|
||||
namespace LiteCharms.Features.TechShop.Tests;
|
||||
|
||||
public class ProductsFeatureTests(Fixture fixture, ITestOutputHelper output) : IClassFixture<Fixture>
|
||||
{
|
||||
[Fact]
|
||||
public async Task GetProductsAsync_ReturnsProducts()
|
||||
{
|
||||
var productService = fixture.Services.GetRequiredService<ProductService>();
|
||||
|
||||
var result = await productService.GetProductsAsync();
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.NotNull(result.Value);
|
||||
|
||||
output.WriteLine($"Retrieved {result.Value.Length} products.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user