diff --git a/backend/Directory.Packages.props b/backend/Directory.Packages.props
index 2666469df4..1c547f45f4 100644
--- a/backend/Directory.Packages.props
+++ b/backend/Directory.Packages.props
@@ -123,6 +123,7 @@
+
diff --git a/backend/FwLite/FwLiteProjectSync.Tests/.gitignore b/backend/FwLite/FwLiteProjectSync.Tests/.gitignore
new file mode 100644
index 0000000000..f97a4d5fe8
--- /dev/null
+++ b/backend/FwLite/FwLiteProjectSync.Tests/.gitignore
@@ -0,0 +1 @@
+!sena-3-live.verified.sqlite
diff --git a/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/Sena3SyncFixture.cs b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/Sena3SyncFixture.cs
index 14d10b15d5..2a93682d8c 100644
--- a/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/Sena3SyncFixture.cs
+++ b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/Sena3SyncFixture.cs
@@ -34,7 +34,7 @@ public async Task InitializeAsync()
await DownloadSena3();
}
- public async Task<(CrdtMiniLcmApi CrdtApi, FwDataMiniLcmApi FwDataApi, IServiceProvider services, IDisposable cleanup)> SetupProjects()
+ public async Task SetupProjects()
{
var sena3MasterCopy = await DownloadSena3();
@@ -49,15 +49,14 @@ public async Task InitializeAsync()
.Value
.ProjectsFolder;
var fwDataProject = new FwDataProject(projectName, projectsFolder);
- var fwDataProjectPath = Path.Combine(fwDataProject.ProjectsPath, fwDataProject.Name);
- DirectoryHelper.Copy(sena3MasterCopy, fwDataProjectPath);
- File.Move(Path.Combine(fwDataProjectPath, "sena-3.fwdata"), fwDataProject.FilePath);
+ DirectoryHelper.Copy(sena3MasterCopy, fwDataProject.ProjectFolder);
+ File.Move(Path.Combine(fwDataProject.ProjectFolder, "sena-3.fwdata"), fwDataProject.FilePath);
var fwDataMiniLcmApi = services.GetRequiredService().GetFwDataMiniLcmApi(fwDataProject, false);
var crdtProject = await services.GetRequiredService()
.CreateProject(new(projectName, projectName, FwProjectId: fwDataMiniLcmApi.ProjectId, SeedNewProjectData: false));
var crdtMiniLcmApi = (CrdtMiniLcmApi)await services.OpenCrdtProject(crdtProject);
- return (crdtMiniLcmApi, fwDataMiniLcmApi, services, cleanup);
+ return new TestProject(crdtMiniLcmApi, fwDataMiniLcmApi, crdtProject, fwDataProject, services, cleanup);
}
public Task DisposeAsync()
diff --git a/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/TestProject.cs b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/TestProject.cs
new file mode 100644
index 0000000000..823dd949a2
--- /dev/null
+++ b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/TestProject.cs
@@ -0,0 +1,13 @@
+using FwDataMiniLcmBridge;
+using FwDataMiniLcmBridge.Api;
+using LcmCrdt;
+
+namespace FwLiteProjectSync.Tests.Fixtures;
+
+public record TestProject(
+ CrdtMiniLcmApi CrdtApi, FwDataMiniLcmApi FwDataApi,
+ CrdtProject CrdtProject, FwDataProject FwDataProject,
+ IServiceProvider Services, IDisposable _cleanup) : IDisposable
+{
+ public void Dispose() { _cleanup.Dispose(); }
+}
diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj
index efc9511b42..d234fd79a9 100644
--- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj
+++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj
@@ -35,6 +35,7 @@
+
@@ -43,4 +44,4 @@
-
\ No newline at end of file
+
diff --git a/backend/FwLite/FwLiteProjectSync.Tests/ProjectSnapshotSerializationTests.cs b/backend/FwLite/FwLiteProjectSync.Tests/ProjectSnapshotSerializationTests.cs
new file mode 100644
index 0000000000..9c2964abef
--- /dev/null
+++ b/backend/FwLite/FwLiteProjectSync.Tests/ProjectSnapshotSerializationTests.cs
@@ -0,0 +1,92 @@
+using LcmCrdt.Tests.Data;
+using FwDataMiniLcmBridge;
+using System.Runtime.CompilerServices;
+using System.Text.Json;
+using System.Text.Json.Nodes;
+
+namespace FwLiteProjectSync.Tests;
+
+public class ProjectSnapshotSerializationTests : BaseSerializationTest
+{
+ public static IEnumerable