Files
git.stella-ops.org/src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Tests/DeadLetter/PostgresDeadLetterRepositoryTests.cs
2026-03-10 01:38:38 +02:00

25 lines
842 B
C#

using Npgsql;
using StellaOps.JobEngine.Infrastructure.Postgres;
namespace StellaOps.JobEngine.Tests.DeadLetter;
public sealed class PostgresDeadLetterRepositoryTests
{
[Theory]
[InlineData(PostgresErrorCodes.UndefinedFunction)]
[InlineData(PostgresErrorCodes.AmbiguousColumn)]
public void ShouldUseActionableSummaryFallback_ReturnsTrue_ForRecoverableLegacySqlStates(string sqlState)
{
Assert.True(PostgresDeadLetterRepository.ShouldUseActionableSummaryFallback(sqlState));
}
[Theory]
[InlineData(PostgresErrorCodes.UndefinedTable)]
[InlineData("XX000")]
[InlineData(null)]
public void ShouldUseActionableSummaryFallback_ReturnsFalse_ForNonFallbackSqlStates(string? sqlState)
{
Assert.False(PostgresDeadLetterRepository.ShouldUseActionableSummaryFallback(sqlState));
}
}