Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static async Task<TestContext> CreateTestContextAsync()
{
var connection = new Microsoft.Data.Sqlite.SqliteConnection("Data Source=:memory:");
connection.Open();
var options = new DbContextOptionsBuilder<Infrastructure.Data.ApplicationDbContext>()
var options = new DbContextOptionsBuilder<SimpleStart.Infrastructure.Data.ApplicationDbContext>()
.UseSqlite(connection)
.Options;

Expand All @@ -56,7 +56,7 @@ private static async Task<TestContext> CreateTestContextAsync()
var serviceProvider = new Mock<IServiceProvider>();
var userContext = new UserContextService(mockAuth.Object, mockUserManager.Object, serviceProvider.Object);

var context = new Infrastructure.Data.ApplicationDbContext(options);
var context = new SimpleStart.Infrastructure.Data.ApplicationDbContext(options);
await context.Database.EnsureCreatedAsync();

var appUserEntity = new ApplicationUser { Id = testUserId, UserName = "testuser", Email = "t@t.com", ActiveOrganizationId = orgId };
Expand Down Expand Up @@ -146,7 +146,7 @@ private static async Task<TestContext> CreateTestContextAsync()
private class TestContext : IAsyncDisposable
{
public required Microsoft.Data.Sqlite.SqliteConnection Connection { get; init; }
public required Infrastructure.Data.ApplicationDbContext Context { get; init; }
public required Aquiis.SimpleStart.Infrastructure.Data.ApplicationDbContext Context { get; init; }
public required ApplicationWorkflowService WorkflowService { get; init; }
public required string UserId { get; init; }
public required Guid OrgId { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task GenerateAndAcceptLeaseOffer_CreatesLeaseAndTenant_UpdatesPrope
// Arrange - setup SQLite in-memory
var connection = new Microsoft.Data.Sqlite.SqliteConnection("Data Source=:memory:");
connection.Open();
var options = new DbContextOptionsBuilder<Infrastructure.Data.ApplicationDbContext>()
var options = new DbContextOptionsBuilder<SimpleStart.Infrastructure.Data.ApplicationDbContext>()
.UseSqlite(connection)
.Options;

Expand All @@ -49,7 +49,7 @@ public async Task GenerateAndAcceptLeaseOffer_CreatesLeaseAndTenant_UpdatesPrope
var userContext = new UserContextService(mockAuth.Object, mockUserManager.Object, serviceProvider.Object);

// Create DbContext and seed data
await using var context = new Infrastructure.Data.ApplicationDbContext(options);
await using var context = new SimpleStart.Infrastructure.Data.ApplicationDbContext(options);
await context.Database.EnsureCreatedAsync();

var appUserEntity = new ApplicationUser { Id = testUserId, UserName = "testuser", Email = "t@t.com", ActiveOrganizationId = orgId };
Expand Down
4 changes: 2 additions & 2 deletions Aquiis.SimpleStart.Tests/ApplicationWorkflowServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task GetApplicationWorkflowStateAsync_ReturnsExpectedState()
// Use SQLite in-memory to support transactions used by workflow base class
var connection = new Microsoft.Data.Sqlite.SqliteConnection("Data Source=:memory:");
connection.Open();
var options = new DbContextOptionsBuilder<Infrastructure.Data.ApplicationDbContext>()
var options = new DbContextOptionsBuilder<SimpleStart.Infrastructure.Data.ApplicationDbContext>()
.UseSqlite(connection)
.Options;
// Create test user and org
Expand Down Expand Up @@ -52,7 +52,7 @@ public async Task GetApplicationWorkflowStateAsync_ReturnsExpectedState()
var userContext = new UserContextService(mockAuth.Object, mockUserManager.Object, serviceProvider.Object);

// Create DbContext and seed prospect/property
await using var context = new Infrastructure.Data.ApplicationDbContext(options);
await using var context = new SimpleStart.Infrastructure.Data.ApplicationDbContext(options);
// Ensure schema is created for SQLite in-memory
await context.Database.EnsureCreatedAsync();
var appUserEntity = new ApplicationUser { Id = testUserId, UserName = "testuser", Email = "t@t.com", ActiveOrganizationId = orgId };
Expand Down
Loading