f813cc4854
CI/CD / CI · API (dotnet build + test) (pull_request) Successful in 43s
CI/CD / CI · Admin API (dotnet build) (pull_request) Successful in 44s
CI/CD / CI · Dashboard (tsc) (pull_request) Successful in 1m7s
CI/CD / CI · Admin Web (tsc) (pull_request) Successful in 36s
CI/CD / CI · Website (tsc) (pull_request) Successful in 45s
CI/CD / CI · Koja (tsc) (pull_request) Successful in 51s
CI/CD / Deploy · all services (pull_request) Has been skipped
The test project no longer compiled: recent feature commits changed interfaces and DTOs without updating the test doubles/call sites, so the whole suite (and therefore CI) was failing to build. - NoOpInventoryService: add IInventoryService.GetPurchasesSummaryAsync and the new string? userId param on AdjustAsync. - NoOpLoyaltyService: add ILoyaltyService.RedeemOnOrderAsync. - NoOpOrderNotificationService: add NotifyCallWaiterAsync. - New NoOpAbuseProtectionService and NoOpMediaStorageService test doubles. - QrMenuTests: ReviewService/PublicService gained IAbuseProtectionService + IHttpContextAccessor (and ReviewService an IMediaStorageService); wire the new no-op doubles + a real HttpContextAccessor. - PrintingTests: OrderDto gained a DisplayNumber int between CreatedAt and Items; pass it. - DiscoverFilterTests: add missing `using Xunit;` and the new openNow arg on DiscoverFilterParams.FromQuery. Result: dotnet test -> Passed: 81, Failed: 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1.9 KiB
C#
30 lines
1.9 KiB
C#
using Meezi.API.Services;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace Meezi.API.Tests;
|
|
|
|
/// <summary>Test double that stores nothing and returns no URL.</summary>
|
|
internal sealed class NoOpMediaStorageService : IMediaStorageService
|
|
{
|
|
public Task<string?> SaveMenuImageAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveMenuVideoAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveTableImageAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveTableVideoAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveCafeLogoAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveCafeCoverAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveMenuModel3dAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveMenuModel3dFromBytesAsync(string cafeId, byte[] glbBytes, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveReviewPhotoAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
public Task<string?> SaveCafeGalleryPhotoAsync(string cafeId, IFormFile file, CancellationToken cancellationToken = default) =>
|
|
Task.FromResult<string?>(null);
|
|
}
|