feat(TestBase): seed real email templates in TestBase setup
- Added `RealEmailTemplates` property with predefined email templates. - Populated the repository with these templates in the `Setup` method. - Ensures tests have consistent, realistic email data available.
This commit is contained in:
@@ -30,9 +30,8 @@ public class HistoryHandler : INotificationHandler<DocSignedNotification>
|
||||
/// <returns></returns>
|
||||
public async Task Handle(DocSignedNotification notification, CancellationToken cancel)
|
||||
{
|
||||
if(notification.Receiver is null)
|
||||
if (notification.Receiver is null)
|
||||
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
|
||||
if (notification.Receiver is null)
|
||||
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
|
||||
|
||||
await _sender.Send(new CreateHistoryCommand()
|
||||
{
|
||||
|
||||
@@ -99,8 +99,8 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
||||
var placeHolders = CreatePlaceHolders(notification);
|
||||
|
||||
var temp = await TempRepo
|
||||
.ReadOnly()
|
||||
.SingleOrDefaultAsync(x => x.Name == notification.TemplateType.ToString(), cancel)
|
||||
.Where(x => x.Name == notification.TemplateType.ToString())
|
||||
.SingleOrDefaultAsync(cancel)
|
||||
?? throw new InvalidOperationException($"Receiver information is missing in the notification." +
|
||||
$"{typeof(TNotification)}:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user