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

+6 -6
View File
@@ -83,14 +83,14 @@ public sealed class WorkspaceChatMoveTests
var movedSent = ((ContentText)chat.Blocks.Single().Content!).FileAttachments.Single();
var stored = JsonSerializer.Deserialize<ChatThread>(await File.ReadAllTextAsync(Path.Combine(targetDirectory, "thread.json")), WorkspaceBehaviour.JSON_OPTIONS)!;
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(File.Exists(draft.FilePath), Is.False, "The move takes the whole chat directory along, so nothing stays at the old path.");
Assert.That(movedDraft.FilePath, Does.StartWith(targetDirectory), "The draft has to point into the directory the chat lives in now.");
Assert.That(File.Exists(movedDraft.FilePath), Is.True, "Otherwise the transcript drops out of the message which is still being written.");
Assert.That(File.Exists(movedSent.FilePath), Is.True, "The transcripts of the sent messages move along, as they always did.");
Assert.That(stored.Draft.MediaTranscripts.Single().FilePath, Is.EqualTo(movedDraft.FilePath), "Opening the chat again brings the draft back from the stored chat, so that has to know the new path as well.");
});
}
}
[Test]
@@ -124,13 +124,13 @@ public sealed class WorkspaceChatMoveTests
var relocatedTranscript = WorkspaceBehaviour.RelocateAttachmentAfterMove(transcript, chatId, Guid.Empty, workspaceId);
var relocatedDocument = WorkspaceBehaviour.RelocateAttachmentAfterMove(document, chatId, Guid.Empty, workspaceId);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(relocatedTranscript, Is.EqualTo(chat.Draft.MediaTranscripts.Single()), "The composer and the draft have to agree, or the composer shows the transcript twice.");
Assert.That(relocatedTranscript.Exists, Is.True, "The message being written has to go out with the transcript.");
Assert.That(relocatedTranscript, Is.InstanceOf<ManagedTranscriptAttachment>(), "The chat still manages the transcript, so removing it from the composer still deletes the file.");
Assert.That(relocatedDocument, Is.SameAs(document), "The move did not touch the document, so it keeps its path.");
});
}
}
[Test]
@@ -154,7 +154,7 @@ public sealed class WorkspaceChatMoveTests
var storedTranscript = ((ContentText)stored.Blocks.Single().Content!).FileAttachments.Single();
var openTranscript = ((ContentText)chat.Blocks.First().Content!).FileAttachments.Single();
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(stored.Blocks, Has.Count.EqualTo(1), "Whoever stores chats manually decides with the save button what reaches the disk, and moving a chat is no saving.");
Assert.That(stored.WorkspaceId, Is.EqualTo(workspaceId), "Opening the chat again has to find it in the workspace it was moved to.");
@@ -162,7 +162,7 @@ public sealed class WorkspaceChatMoveTests
Assert.That(chat.Blocks, Has.Count.EqualTo(2), "Nothing the user did not save may get lost by moving the chat; it stays unsaved in the open chat.");
Assert.That(chat.WorkspaceId, Is.EqualTo(workspaceId), "The open chat follows the move, so saving it later stores it in the new place.");
Assert.That(File.Exists(openTranscript.FilePath), Is.True, "The open chat has to point at its transcripts in the new place as well.");
});
}
}
private static ContentBlock UserMessage(string text, params FileAttachment[] attachments) => new()