Files
James Wampler 23348327a9 Remove Scenes, group beats by multiple characters; strip comments repo-wide
Drop the Scene entity/grouping in favor of chapters carrying prose directly
and beats belonging to many characters. Add markdown editor + character
multi-select components to the web client. Remove all XML doc and inline
comments across the touched C#/TS/CSS files in favor of self-documenting
names, and record that convention in CLAUDE.md. Add .mcp.json (local MCP
server config, no secrets) and ignore .idea/.
2026-08-11 21:05:13 -07:00

32 lines
742 B
C#

using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Novelly.Api.Data;
namespace Novelly.Api.Tests;
public class TestDatabase : IDisposable
{
private readonly SqliteConnection _connection;
public TestDatabase()
{
_connection = new SqliteConnection("Data Source=:memory:");
_connection.Open();
Context = CreateContext();
Context.Database.EnsureCreated();
}
public NovelDbContext Context { get; }
public NovelDbContext CreateContext() =>
new(new DbContextOptionsBuilder<NovelDbContext>().UseSqlite(_connection).Options);
public void Dispose()
{
Context.Dispose();
_connection.Dispose();
GC.SuppressFinalize(this);
}
}