Files
SIG-CM2.0/tests/SIGCM2.Application.Tests/Domain/Pricing/ChargeableChars/ChargeableCharConfigReactivationNotAllowedExceptionTests.cs

33 lines
1016 B
C#
Raw Normal View History

using FluentAssertions;
using SIGCM2.Domain.Pricing.Exceptions;
namespace SIGCM2.Application.Tests.Domain.Pricing.ChargeableChars;
/// <summary>
/// PRC-001 — Unit tests for ChargeableCharConfigReactivationNotAllowedException.
/// </summary>
public sealed class ChargeableCharConfigReactivationNotAllowedExceptionTests
{
[Theory]
[InlineData("ALREADY_ACTIVE")]
[InlineData("VIGENTE_EXISTS")]
[InlineData("POSTERIOR_ROWS_EXIST")]
public void Constructor_SetsIdAndReason(string reason)
{
var ex = new ChargeableCharConfigReactivationNotAllowedException(42L, reason);
ex.Id.Should().Be(42L);
ex.Reason.Should().Be(reason);
ex.Message.Should().Contain("42");
ex.Message.Should().Contain(reason);
}
[Fact]
public void Exception_IsDomainException()
{
var ex = new ChargeableCharConfigReactivationNotAllowedException(1L, "ALREADY_ACTIVE");
ex.Should().BeAssignableTo<SIGCM2.Domain.Exceptions.DomainException>();
}
}