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();
    }
}
