Replace BLite with Surreal embedded persistence
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user