using FluentAssertions;
using SIGCM2.Domain.Exceptions;

namespace SIGCM2.Application.Tests.Domain.Rubros;

public class RubroConProductosActivosExceptionTests
{
    [Fact]
    public void Constructor_SetsPropertiesAndMessage()
    {
        var ex = new RubroConProductosActivosException(rubroId: 7, productosActivosCount: 3);

        ex.RubroId.Should().Be(7);
        ex.ProductosActivosCount.Should().Be(3);
        ex.Message.Should().Contain("7");
        ex.Message.Should().Contain("3");
        ex.Message.Should().Contain("producto");
    }

    [Fact]
    public void Constructor_InheritsFromDomainException()
    {
        var ex = new RubroConProductosActivosException(1, 2);

        ex.Should().BeAssignableTo<DomainException>();
    }
}
