mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 02:39:00 +00:00
Added mailboxes as local data sources (#1022)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
1 parent
93be539e50
commit
c4400c0ff6
343 files changed
+26051
-3122
No files matched your search
@@ -0,0 +1,51 @@
|
||||
using AIStudio.Tools.Mail;
|
||||
|
||||
using MimeKit;
|
||||
|
||||
namespace AIStudio.Tests.Tools.Mail;
|
||||
|
||||
/// <summary>
|
||||
/// Checks how the three headers for the importance of a mail are read.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public sealed class MailImportanceDetectionTests
|
||||
{
|
||||
[TestCase("Importance", "High", ExpectedResult = MailImportance.HIGH)]
|
||||
[TestCase("Importance", "low", ExpectedResult = MailImportance.LOW)]
|
||||
[TestCase("Importance", "normal", ExpectedResult = MailImportance.NORMAL)]
|
||||
[TestCase("X-Priority", "1 (Highest)", ExpectedResult = MailImportance.HIGH)]
|
||||
[TestCase("X-Priority", "2", ExpectedResult = MailImportance.HIGH)]
|
||||
[TestCase("X-Priority", "3 (Normal)", ExpectedResult = MailImportance.NORMAL)]
|
||||
[TestCase("X-Priority", "4 (Low)", ExpectedResult = MailImportance.LOW)]
|
||||
[TestCase("X-Priority", "5", ExpectedResult = MailImportance.LOW)]
|
||||
[TestCase("X-Priority", "10", ExpectedResult = MailImportance.NORMAL)]
|
||||
[TestCase("Priority", "urgent", ExpectedResult = MailImportance.HIGH)]
|
||||
[TestCase("Priority", "Non-Urgent", ExpectedResult = MailImportance.LOW)]
|
||||
public MailImportance EachHeaderIsRead(string field, string value)
|
||||
{
|
||||
var headers = new HeaderList();
|
||||
headers.Add(field, value);
|
||||
return MailImportanceDetection.Detect(headers);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheImportanceHeaderComesFirst()
|
||||
{
|
||||
var headers = new HeaderList();
|
||||
headers.Add("X-Priority", "1 (Highest)");
|
||||
headers.Add("Importance", "low");
|
||||
Assert.That(MailImportanceDetection.Detect(headers), Is.EqualTo(MailImportance.LOW));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AValueNobodyDefinedLeavesTheDecisionToTheNextHeader()
|
||||
{
|
||||
var headers = new HeaderList();
|
||||
headers.Add("Importance", "whenever");
|
||||
headers.Add("X-Priority", "1 (Highest)");
|
||||
Assert.That(MailImportanceDetection.Detect(headers), Is.EqualTo(MailImportance.HIGH));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AMailWithoutAnyOfTheHeadersIsNormal() => Assert.That(MailImportanceDetection.Detect(new HeaderList()), Is.EqualTo(MailImportance.NORMAL));
|
||||
}
|
||||
Reference in new issue
Block a user