Rename Project concept to Novel across the stack
Renames the domain concept from Project to Novel throughout the backend (entities, DTOs, services, endpoints, ProjectAccessService/Permission, ProjectId foreign keys), MCP server (tool names and routes), and the React/Vite frontend (types, hooks, routes, components). Adds a new EF Core migration (RenameProjectToNovel) using RenameTable/RenameColumn to preserve existing data instead of dropping/recreating tables. Updates CLAUDE.md's structure section to reference Novels/ instead of Projects/.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Novelly.Api.Chapters;
|
||||
using Novelly.Api.Common;
|
||||
using Novelly.Api.Common.Validation;
|
||||
using Novelly.Api.Projects;
|
||||
using Novelly.Api.Novels;
|
||||
|
||||
namespace Novelly.Api.Tests;
|
||||
|
||||
@@ -10,22 +10,22 @@ public class ExceptionHandlingTests : ServiceTestFixture
|
||||
{
|
||||
[Test]
|
||||
public void Guard_rejects_an_empty_guid_passed_as_a_required_id() =>
|
||||
Assert.That(() => Projects.GetAsync(Guid.Empty), Throws.TypeOf<ArgumentException>());
|
||||
Assert.That(() => Novels.GetAsync(Guid.Empty), Throws.TypeOf<ArgumentException>());
|
||||
|
||||
[Test]
|
||||
public void Guard_rejects_a_null_request_object() =>
|
||||
Assert.That(
|
||||
() => Projects.CreateAsync(null!),
|
||||
() => Novels.CreateAsync(null!),
|
||||
Throws.TypeOf<ArgumentNullException>());
|
||||
|
||||
[Test]
|
||||
public async Task Deleting_a_missing_project_returns_false_rather_than_throwing() =>
|
||||
Assert.That(await Projects.DeleteAsync(Guid.NewGuid()), Is.False);
|
||||
public async Task Deleting_a_missing_novel_returns_false_rather_than_throwing() =>
|
||||
Assert.That(await Novels.DeleteAsync(Guid.NewGuid()), Is.False);
|
||||
|
||||
[Test]
|
||||
public void A_blank_title_fails_the_create_project_validator()
|
||||
public void A_blank_title_fails_the_create_novel_validator()
|
||||
{
|
||||
var result = new CreateProjectRequestValidator().Validate(new CreateProjectRequest(""));
|
||||
var result = new CreateNovelRequestValidator().Validate(new CreateNovelRequest(""));
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
@@ -37,10 +37,10 @@ public class ExceptionHandlingTests : ServiceTestFixture
|
||||
[Test]
|
||||
public void Calling_a_service_directly_with_an_invalid_request_throws_rather_than_silently_accepting_it() =>
|
||||
Assert.That(
|
||||
() => Projects.CreateAsync(new CreateProjectRequest("")),
|
||||
() => Novels.CreateAsync(new CreateNovelRequest("")),
|
||||
Throws.TypeOf<ArgumentException>());
|
||||
|
||||
[Test]
|
||||
public async Task Creating_a_chapter_under_a_missing_project_returns_null_rather_than_throwing() =>
|
||||
public async Task Creating_a_chapter_under_a_missing_novel_returns_null_rather_than_throwing() =>
|
||||
Assert.That(await Chapters.CreateAsync(Guid.NewGuid(), new CreateChapterRequest("Landfall")), Is.Null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user