mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 19:27:21 +00:00
Upgraded to .NET 10 (#1147)
This commit is contained in:
1 parent
faae2951f7
commit
fc7399e81b
327 files changed
+3059
-3049
No files matched your search
@@ -70,12 +70,12 @@ public sealed class WorkspaceTreeCacheTests
|
||||
var target = snapshot.Workspaces.Single(workspace => workspace.WorkspaceId == targetId);
|
||||
var expectedPath = Path.Combine(this.testDirectory, "workspaces", targetId.ToString(), chat.ChatId.ToString());
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(snapshot.TemporaryChats.Select(entry => entry.ChatId), Does.Not.Contain(chat.ChatId), "The chat lives in a workspace now, so the disappearing chats must not list it any longer.");
|
||||
Assert.That(target.ChatsLoaded, Is.True, "The chats of the target workspace were loaded before the move, and they still are.");
|
||||
Assert.That(target.Chats.Select(entry => entry.ChatPath), Does.Contain(expectedPath), "The target workspace lists the chat with the directory it lives in now.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -89,11 +89,11 @@ public sealed class WorkspaceTreeCacheTests
|
||||
await WorkspaceBehaviour.MoveChatAsync(chat, targetId, storeUnsavedChanges: true);
|
||||
|
||||
var other = await GetWorkspaceAsync(otherId);
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(other.ChatsLoaded, Is.True, "A move must not make the cache forget the chats of a workspace which has nothing to do with it. The list would show that workspace empty.");
|
||||
Assert.That(other.Chats.Select(entry => entry.ChatId), Does.Contain(otherChat.ChatId));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -107,11 +107,11 @@ public sealed class WorkspaceTreeCacheTests
|
||||
|
||||
var source = await GetWorkspaceAsync(sourceId);
|
||||
var target = await GetWorkspaceAsync(targetId);
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(source.Chats.Select(entry => entry.ChatId), Does.Not.Contain(chat.ChatId), "The chat left this workspace.");
|
||||
Assert.That(target.Chats.Select(entry => entry.ChatId), Does.Contain(chat.ChatId), "The chat arrived in this workspace.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -140,11 +140,11 @@ public sealed class WorkspaceTreeCacheTests
|
||||
await WorkspaceBehaviour.MoveChatAsync(chat, targetResult.Workspace.WorkspaceId, storeUnsavedChanges: true);
|
||||
|
||||
var target = await GetWorkspaceAsync(targetResult.Workspace.WorkspaceId);
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(target.ChatsLoaded, Is.True, "A workspace created just now has no chats on the disk, so there is nothing left to load.");
|
||||
Assert.That(target.Chats.Select(entry => entry.ChatId), Does.Contain(chat.ChatId), "Otherwise, the user has to click the new workspace before the chat shows up.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -157,11 +157,11 @@ public sealed class WorkspaceTreeCacheTests
|
||||
|
||||
var snapshot = await WorkspaceBehaviour.GetOrLoadWorkspaceTreeShellAsync();
|
||||
var chats = await WorkspaceBehaviour.GetWorkspaceChatsAsync(targetId);
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(snapshot.Workspaces.Select(workspace => workspace.WorkspaceId), Does.Contain(targetId), "The move created the workspace directory, so the list has to show it.");
|
||||
Assert.That(chats.Select(entry => entry.ChatId), Does.Contain(chat.ChatId));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user