feat: add commerce order and payment checkout

This commit is contained in:
xiong
2026-07-26 19:34:00 +08:00
parent 5503d7a644
commit 494039973d
8 changed files with 1045 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Npgsql;
using Tiku.Application.Commerce;
using Tiku.Application.Auth;
using Tiku.Application.Storage;
using Tiku.Domain.Identity;
@@ -12,7 +13,8 @@ namespace Tiku.IntegrationTests.Api;
public sealed class ApiTestFactory(
IWechatOAuthClient? wechatOAuthClient = null,
IObjectStorageService? objectStorageService = null) : WebApplicationFactory<Program>
IObjectStorageService? objectStorageService = null,
IPaymentProviderGateway? paymentProviderGateway = null) : WebApplicationFactory<Program>
{
private readonly string databaseName = Guid.NewGuid().ToString();
@@ -42,6 +44,11 @@ public sealed class ApiTestFactory(
{
services.AddSingleton(objectStorageService);
}
if (paymentProviderGateway is not null)
{
services.AddSingleton(paymentProviderGateway);
}
});
}