refacto + test fixes

This commit is contained in:
Paul Schneider 2026-08-28 21:33:11 +01:00
commit 7edb2d7915
8 changed files with 60 additions and 32 deletions

View file

@ -0,0 +1,11 @@
namespace Yavsc.Blogs.Tests.Fixtures;
public static class BlogHelpers
{
public static string BlogUrl(this IBackendFixture fixture)
=> $"{fixture.Addresses.First(a => a.StartsWith("https://"))}/{Constants.APIPrefix}/{Constants.BlogSpotPath}";
public static string BlogAclUrl(this IBackendFixture fixture)
=> $"{fixture.Addresses.First(a => a.StartsWith("https://"))}/{Constants.APIPrefix}/{Constants.BlogAclPath}";
}

View file

@ -0,0 +1,15 @@
using Yavsc.Blogs.Tests;
public interface IBackendFixture
{
/// <summary>
/// The addresses the fixture bound to.
/// </summary>
IReadOnlyList<string> Addresses { get; }
/// <summary>
/// The service provider for the fixture host.
/// </summary>
IServiceProvider Services { get; }
}