2026-07-06 21:49:53 +01:00
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
|
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
|
|
|
<Nullable>enable</Nullable>
|
|
|
|
|
<IsPackable>false</IsPackable>
|
|
|
|
|
<RootNamespace>Yavsc.Blogs.Tests</RootNamespace>
|
|
|
|
|
<UserSecretsId>b1a9d0d6-3f5e-4a07-9f0a-7e4d5b6c1a82</UserSecretsId>
|
|
|
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
2026-08-18 17:20:59 +01:00
|
|
|
<AssemblyVersion>1.1.0.0</AssemblyVersion>
|
|
|
|
|
<FileVersion>1.1.0.0</FileVersion>
|
2026-08-18 19:18:36 +01:00
|
|
|
<InformationalVersion>1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3</InformationalVersion>
|
2026-08-18 17:20:59 +01:00
|
|
|
<Version>1.1.0-beta.1</Version>
|
2026-07-06 21:49:53 +01:00
|
|
|
</PropertyGroup>
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<PackageReference Include="coverlet.collector" />
|
|
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
|
|
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
|
|
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
|
feat(postit): circles+ACL UI, blog fixture→SQLite, seed default user
Bundled end-of-branch commit on feat/postit-acl-members.
PostIt UI for circles + per-post ACL
- Reorganise PostIt.Tests into Auth/ and Blogs/ subfolders
(Bearer/OIDC scope tests vs. blog API fakes live where they
belong) and introduces PostItHeadlessCollection so the
Avalonia.Headless tests share a single xUnit collection
instead of contending with the EF-Core test host.
- Adds BlogAclApiTests (a brand-new behavioural layer over
POST /api/v1/blogacl) and the fakes it relies on
(BlogApiTestFakes, BlogPostAuthorDtoTests, AddCircleMember
DialogTests); pulls UserId-through-OIDC-sub path into
BearerScopeTests / FakeAuthorizingBrowser /
OidcStubAuthority.
- App.axaml.cs gets a small PushPageAsync touch-up the new
tests rely on.
- Drops UnitTest1.cs (xUnit scaffold, never used).
Yavsc.Blogs.Tests — SQLite instead of InMemory
- Bumps Yavsc.Blogs.Tests.csproj on
Microsoft.EntityFrameworkCore.Sqlite and rewrites
BlogsWebServerFixture to hold a single shared
SqliteConnection (Cache=Shared) for the fixture lifetime,
with a sync Dispose close to dodge async teardown hangs.
Reason: the EF Core InMemory provider silently ignores FKs,
which masked the kind of bug we are about to pin in the
ACL tests. SQLite enforces them, so any future INSERT that
forgets to seed its parent rows fails loudly here instead
of passing the test and breaking prod.
- PublishEndpointTests and BlogApiSmokeTests get a one-line
tweak to follow the new connection lifecycle.
Foreign-key fallout: seed the default user in the fixture
- Adds BlogsWebServerFixture.SeedUser(userName). Now that
SQLite enforces BlogPost.AuthorId → AspNetUsers.Id, every
test that POST/PUT/DELETE a BlogPost and sends AuthorId=
'tester' in the payload needs an AspNetUsers row to satisfy
the FK or it returns 500 with SQLite Error 19.
- BlogApiTests wraps the existing ResetDatabase with a
ResetAndSeedDefaultUser helper for the six mutating tests;
the four GET-only and ModelState-only tests keep the bare
ResetDatabase.
- Side benefit: every test in Yavsc.Blogs.Tests now finishes
cleanly instead of hanging at teardown — previously a stuck
test held the shared SqliteConnection open and the next
tests waited indefinitely.
Verified: dotnet test src/Yavsc.Blogs.Tests passes 25/25
green from a clean run, no fixture teardown hang.
2026-08-20 23:59:21 +01:00
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
|
2026-07-06 21:49:53 +01:00
|
|
|
<PackageReference Include="xunit.v3" />
|
|
|
|
|
<PackageReference Include="xunit.v3.common" />
|
|
|
|
|
<PackageReference Include="xunit.v3.extensibility.core" />
|
|
|
|
|
<PackageReference Include="xunit.runner.visualstudio" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<ProjectReference Include="..\Yavsc.Abstract\Yavsc.Abstract.csproj" />
|
|
|
|
|
<ProjectReference Include="..\Yavsc.Server\Yavsc.Server.csproj" />
|
|
|
|
|
<ProjectReference Include="..\Yavsc.Blogs\Yavsc.Blogs.csproj" />
|
|
|
|
|
<ProjectReference Include="..\Yavsc.Tests.Shared\Yavsc.Tests.Shared.csproj" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<Using Include="Xunit" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<PackageReference Include="GitVersion.MsBuild" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
</Project>
|