Upgraded to .NET 10 (#1147)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-01 20:32:16 +01:00
1 parent faae2951f7
commit fc7399e81b
327 files changed
+3059 -3049

No files matched your search

+10 -10
View File
@@ -25,28 +25,28 @@ public sealed class MailFolderSyncPlanTests
public void TheFirstPassFindsEverythingNewTheNewestFirst()
{
var plan = MailFolderSyncPlan.Create(null, new Dictionary<long, MailFlags>(), State(highestModSeq: 900), [3, 1, 2]);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(plan.UidValidityChanged, Is.False);
Assert.That(plan.NewUids, Is.EqualTo(new long[] { 3, 2, 1 }), "The newest mails are not indexed first.");
Assert.That(plan.GoneUids, Is.Empty);
Assert.That(plan.KeptUids, Is.Empty);
Assert.That(plan.ChecksFlags, Is.False);
});
}
}
[Test]
public void TheDifferenceSaysWhatIsNewAndWhatIsGone()
{
var plan = MailFolderSyncPlan.Create(Stored(highestModSeq: null), STORED_LOCATIONS, State(highestModSeq: null), [11, 12, 13, 14]);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(plan.NewUids, Is.EqualTo(new long[] { 14, 13 }));
Assert.That(plan.GoneUids, Is.EqualTo(new long[] { 10 }), "A mail which no longer belongs into the index stays.");
Assert.That(plan.KeptUids, Is.EqualTo(new long[] { 11, 12 }));
Assert.That(plan.ChecksFlags, Is.True, "Without CONDSTORE only fetching every flag tells.");
Assert.That(plan.FlagsChangedSinceModSeq, Is.Null);
});
}
}
[Test]
@@ -54,37 +54,37 @@ public sealed class MailFolderSyncPlanTests
{
var changed = MailFolderSyncPlan.Create(Stored(highestModSeq: 900), STORED_LOCATIONS, State(highestModSeq: 950), [10, 11, 12]);
var unchanged = MailFolderSyncPlan.Create(Stored(highestModSeq: 900), STORED_LOCATIONS, State(highestModSeq: 900), [10, 11, 12]);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(changed.ChecksFlags, Is.True);
Assert.That(changed.FlagsChangedSinceModSeq, Is.EqualTo(900));
Assert.That(unchanged.ChecksFlags, Is.False, "The flags are fetched although nothing changed.");
});
}
}
[Test]
public void APassWhichNeverCompletedChecksEveryFlag()
{
var plan = MailFolderSyncPlan.Create(Stored(highestModSeq: null), STORED_LOCATIONS, State(highestModSeq: 950), [10, 11, 12]);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(plan.ChecksFlags, Is.True);
Assert.That(plan.FlagsChangedSinceModSeq, Is.Null);
});
}
}
[Test]
public void ANewUidValidityVoidsEveryStoredUid()
{
var plan = MailFolderSyncPlan.Create(Stored(highestModSeq: 900), STORED_LOCATIONS, State(highestModSeq: 950, uidValidity: UID_VALIDITY + 1), [1, 2]);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(plan.UidValidityChanged, Is.True);
Assert.That(plan.NewUids, Is.EqualTo(new long[] { 2, 1 }), "The mails under their new UIDs are not looked at.");
Assert.That(plan.GoneUids, Is.Empty, "The stored UIDs are void, not gone: their mails are linked anew by their key.");
Assert.That(plan.KeptUids, Is.Empty, "A void UID is kept.");
Assert.That(plan.ChecksFlags, Is.False);
});
}
}
[Test]