Replace BLite with Surreal embedded persistence
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s

This commit is contained in:
Joseph Doherty
2026-02-22 05:21:53 -05:00
parent 7ebc2cb567
commit 9c2a77dc3c
56 changed files with 6613 additions and 3177 deletions

View File

@@ -10,7 +10,7 @@ public class SampleDbContextTests : IDisposable
/// </summary>
public SampleDbContextTests()
{
_dbPath = Path.Combine(Path.GetTempPath(), $"test_sample_{Guid.NewGuid()}.db");
_dbPath = Path.Combine(Path.GetTempPath(), $"test_sample_{Guid.NewGuid()}.rocksdb");
_context = new SampleDbContext(_dbPath);
}
@@ -20,10 +20,10 @@ public class SampleDbContextTests : IDisposable
public void Dispose()
{
_context?.Dispose();
if (File.Exists(_dbPath))
if (Directory.Exists(_dbPath))
try
{
File.Delete(_dbPath);
Directory.Delete(_dbPath, true);
}
catch
{
@@ -38,9 +38,9 @@ public class SampleDbContextTests : IDisposable
{
// Verifica che le collezioni siano state inizializzate
_context.ShouldNotBeNull();
_context.Users.ShouldNotBeNull("Users collection should be initialized by BLite");
_context.TodoLists.ShouldNotBeNull("TodoLists collection should be initialized by BLite");
_context.OplogEntries.ShouldNotBeNull("OplogEntries collection should be initialized by BLite");
_context.Users.ShouldNotBeNull("Users collection should be initialized by Surreal context");
_context.TodoLists.ShouldNotBeNull("TodoLists collection should be initialized by Surreal context");
_context.OplogEntries.ShouldNotBeNull("OplogEntries view should be initialized by Surreal context");
}
/// <summary>
@@ -220,4 +220,4 @@ public class SampleDbContextTests : IDisposable
adults.Select(u => u.Name).ShouldContain("Adult");
adults.Select(u => u.Name).ShouldContain("Senior");
}
}
}