test(notification-outbox): cover all Notification constructor null guards

This commit is contained in:
Joseph Doherty
2026-05-19 00:50:52 -04:00
parent 397a62677f
commit ed7fddb0b5

View File

@@ -22,12 +22,12 @@ public class NotificationEntityTests
} }
[Fact] [Fact]
public void Constructor_NullListName_Throws() public void Constructor_NullArguments_Throw()
=> Assert.Throws<ArgumentNullException>( {
() => new Notification("id", NotificationType.Email, null!, "s", "b", "SiteA")); Assert.Throws<ArgumentNullException>(() => new Notification(null!, NotificationType.Email, "list", "s", "b", "SiteA"));
Assert.Throws<ArgumentNullException>(() => new Notification("id", NotificationType.Email, null!, "s", "b", "SiteA"));
[Fact] Assert.Throws<ArgumentNullException>(() => new Notification("id", NotificationType.Email, "list", null!, "b", "SiteA"));
public void Constructor_NullNotificationId_Throws() Assert.Throws<ArgumentNullException>(() => new Notification("id", NotificationType.Email, "list", "s", null!, "SiteA"));
=> Assert.Throws<ArgumentNullException>( Assert.Throws<ArgumentNullException>(() => new Notification("id", NotificationType.Email, "list", "s", "b", null!));
() => new Notification(null!, NotificationType.Email, "list", "s", "b", "SiteA")); }
} }