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

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-04 12:26:26 +02:00
1 parent 93be539e50
commit c4400c0ff6
343 files changed
+26051 -3122

No files matched your search

+32
View File
@@ -230,6 +230,38 @@ public sealed class SourceExtensionsTests
Assert.That(source.TryGetDocumentLocation(out _), Is.False, "A web source is opened by the browser and has no path to hand to a program.");
}
[Test]
public void AMailIsToldApartByTheAddressItsToolGaveIt()
{
ISource mail = new Source("Mail: Budget — Alice, 2026-09-10", SourceExtensions.CreateMailSourceUrl("9e4b2c7a-1d3f-4a8e-b6c5-2f0d7e1b3a64", "5e2a9c1f-7b3d-4f8e-a6c4-1d9b0e7f3a52"), SourceOrigin.TOOL);
ISource webPage = new Source("Article", "https://example.org/mailbox/article", SourceOrigin.TOOL);
Assert.Multiple(() =>
{
Assert.That(mail.IsMailSource(), Is.True);
Assert.That(mail.TryGetDocumentLocation(out _), Is.False, "A mail is no file a program could open.");
Assert.That(webPage.IsMailSource(), Is.False, "What decides is the scheme, not a word somewhere in the address.");
});
}
[Test]
public void AMailIsNamedWithoutALinkThatLeadsNowhere()
{
IList<Source> sources =
[
new("Mail: Budget [draft] — Alice, 2026-09-10", SourceExtensions.CreateMailSourceUrl("9e4b2c7a-1d3f-4a8e-b6c5-2f0d7e1b3a64", "5e2a9c1f-7b3d-4f8e-a6c4-1d9b0e7f3a52"), SourceOrigin.TOOL),
new("Search result", "https://example.org/search", SourceOrigin.TOOL),
];
var entries = EntriesOf(sources.ToMarkdown());
Assert.Multiple(() =>
{
Assert.That(entries[0], Is.EqualTo(@"- [1] Mail: Budget \[draft\] — Alice, 2026-09-10"), "Exported or copied, a mailbox address would be a link nobody can follow.");
Assert.That(entries[1], Is.EqualTo("- [2] [Search result](<https://example.org/search>)"), "Every other source keeps its link.");
});
}
/// <summary>
/// Reads where the link of a source points, and fails the test when it points nowhere.
/// </summary>