This commit is contained in:
@@ -10,7 +10,40 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
private readonly ProductService productService = fixture.Services.GetRequiredService<ProductService>();
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductPriceAsync_ShouldReturn_RetultOneProductPrice()
|
||||
public async Task AddProductCategoryAsync_ShouldReturn_ResultWithId()
|
||||
{
|
||||
var result = await productService.AddProductCategoryAsync(1, 2, fixture.CancellationToken);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductCategoriesAsync_ShouldReturn_ResultWithCategoryList()
|
||||
{
|
||||
var result = await productService.GetProductCategoriesAsync(1, fixture.CancellationToken);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.NotEmpty(result.Value);
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task DeleteProductCategoryAsync_ShouldReturn_ResultWithSuccess()
|
||||
{
|
||||
var result = await productService.DeleteProductCategoryAsync(1, 1, fixture.CancellationToken);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task DeleteAllProductCategoriesAsync_ShouldReturn_ResultWithSuccess()
|
||||
{
|
||||
var result = await productService.DeleteAllProductCategoriesAsync(1, fixture.CancellationToken);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductPriceAsync_ShouldReturn_ResultOneProductPrice()
|
||||
{
|
||||
var result = await productService.GetProductPriceAsync(2, fixture.CancellationToken);
|
||||
|
||||
@@ -21,7 +54,7 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductPricesAsync_ShouldReturn_RetultProductPriceList()
|
||||
public async Task GetProductPricesAsync_ShouldReturn_ResultProductPriceList()
|
||||
{
|
||||
var result = await productService.GetProductPricesAsync(2, fixture.CancellationToken);
|
||||
|
||||
@@ -32,7 +65,7 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task SearchProductsAsync_ShouldReturn_RetultMatchingProducts()
|
||||
public async Task SearchProductsAsync_ShouldReturn_ResultMatchingProducts()
|
||||
{
|
||||
var filter = new ProductFilter
|
||||
{
|
||||
@@ -52,7 +85,7 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductAsync_ShouldReturn_RetultOneProduct()
|
||||
public async Task GetProductAsync_ShouldReturn_ResultOneProduct()
|
||||
{
|
||||
var result = await productService.GetProductAsync(2, fixture.CancellationToken);
|
||||
|
||||
@@ -63,7 +96,7 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task GetProductsAsync_ShouldReturn_RetultProducts()
|
||||
public async Task GetProductsAsync_ShouldReturn_ResultProducts()
|
||||
{
|
||||
var range = new DateRange
|
||||
{
|
||||
@@ -81,7 +114,7 @@ public class ProductServiceFeatureTests(Fixture fixture, ITestOutputHelper outpu
|
||||
}
|
||||
|
||||
[IntegrationFact]
|
||||
public async Task UpdateProductStatusAsync_ShouldReturn_ResultTrue()
|
||||
public async Task UpdateProductStatusAsync_ShouldResurn_ResultTrue()
|
||||
{
|
||||
var result = await productService.UpdateProductStatusAsync(2, true, fixture.CancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user