forked from gongxuegit/tiku-backend.net
feat: add commerce order and payment checkout
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user