refactor: eliminar NullProductQueryRepository dead code + EXISTS en ProductQueryRepository (PRD-002 S1 S2)
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
using FluentAssertions;
|
||||
using SIGCM2.Application.Products;
|
||||
|
||||
namespace SIGCM2.Application.Tests.ProductTypes;
|
||||
|
||||
public class NullProductQueryRepositoryTests
|
||||
{
|
||||
private readonly NullProductQueryRepository _sut = new();
|
||||
|
||||
[Fact]
|
||||
public async Task ExistsActiveByProductTypeAsync_AlwaysReturnsFalse()
|
||||
{
|
||||
var result = await _sut.ExistsActiveByProductTypeAsync(productTypeId: 1);
|
||||
|
||||
result.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ExistsActiveByProductTypeAsync_WithCancellationToken_DoesNotThrow()
|
||||
{
|
||||
using var cts = new CancellationTokenSource();
|
||||
var act = async () => await _sut.ExistsActiveByProductTypeAsync(productTypeId: 999, ct: cts.Token);
|
||||
|
||||
await act.Should().NotThrowAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user