From 926ca902bdca4ef89d7ae84bfecf64d9a4436050 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 19 May 2026 00:47:23 -0400 Subject: [PATCH] test(notification-outbox): fold notification enum tests into EnumTests convention --- .../Types/EnumTests.cs | 4 ++++ .../Types/NotificationEnumTests.cs | 21 ------------------- 2 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 tests/ScadaLink.Commons.Tests/Types/NotificationEnumTests.cs diff --git a/tests/ScadaLink.Commons.Tests/Types/EnumTests.cs b/tests/ScadaLink.Commons.Tests/Types/EnumTests.cs index a7eaf70..6507f7d 100644 --- a/tests/ScadaLink.Commons.Tests/Types/EnumTests.cs +++ b/tests/ScadaLink.Commons.Tests/Types/EnumTests.cs @@ -12,6 +12,8 @@ public class EnumTests [InlineData(typeof(AlarmLevel), new[] { "None", "Low", "LowLow", "High", "HighHigh" })] [InlineData(typeof(AlarmTriggerType), new[] { "ValueMatch", "RangeViolation", "RateOfChange", "HiLo", "Expression" })] [InlineData(typeof(ConnectionHealth), new[] { "Connected", "Disconnected", "Connecting", "Error" })] + [InlineData(typeof(NotificationStatus), new[] { "Pending", "Retrying", "Delivered", "Parked", "Discarded" })] + [InlineData(typeof(NotificationType), new[] { "Email" })] public void Enum_ShouldHaveExpectedValues(Type enumType, string[] expectedNames) { var actualNames = Enum.GetNames(enumType); @@ -26,6 +28,8 @@ public class EnumTests [InlineData(typeof(AlarmLevel))] [InlineData(typeof(AlarmTriggerType))] [InlineData(typeof(ConnectionHealth))] + [InlineData(typeof(NotificationStatus))] + [InlineData(typeof(NotificationType))] public void Enum_ShouldBeSingularNamed(Type enumType) { // Singular names should not end with 's' (except 'Status' which is singular) diff --git a/tests/ScadaLink.Commons.Tests/Types/NotificationEnumTests.cs b/tests/ScadaLink.Commons.Tests/Types/NotificationEnumTests.cs deleted file mode 100644 index be6a434..0000000 --- a/tests/ScadaLink.Commons.Tests/Types/NotificationEnumTests.cs +++ /dev/null @@ -1,21 +0,0 @@ -using ScadaLink.Commons.Types.Enums; - -namespace ScadaLink.Commons.Tests.Types; - -public class NotificationEnumTests -{ - [Fact] - public void NotificationStatus_HasExactlyTheCentralStates() - { - var names = Enum.GetNames(); - Assert.Equal( - new[] { "Pending", "Retrying", "Delivered", "Parked", "Discarded" }, - names); - } - - [Fact] - public void NotificationType_HasEmail() - { - Assert.True(Enum.IsDefined(NotificationType.Email)); - } -}