mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-11 16:33:48 +00:00
18 lines
637 B
C#
18 lines
637 B
C#
using System.Runtime.CompilerServices;
|
|||
|
|
|
||
|
|
using MimeKit;
|
||
|
|
|
||
|
|
namespace AIStudio.Tests.Tools.Mail;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Loads the mails in the Fixtures folder next to this file.
|
||
|
|
/// </summary>
|
||
|
|
/// <remarks>
|
||
|
|
/// The fixtures are real mails, encoded the way mail programs send them, so that a test sees what
|
||
|
|
/// MimeKit makes of the encodings rather than text which was never encoded at all.
|
||
|
|
/// </remarks>
|
||
|
|
internal static class MailFixtures
|
||
|
|
{
|
||
|
|
public static MimeMessage Load(string fileName, [CallerFilePath] string sourceFilePath = "") =>
|
||
|
|
MimeMessage.Load(Path.Combine(Path.GetDirectoryName(sourceFilePath)!, "Fixtures", fileName));
|
||
|
|
}
|