build-flow.api/tests/BuildFlow.Workflow.Tests/Notification/NoOpPlatformNotificationPublisher.cs
2026-07-24 12:53:36 +08:00

17 lines
649 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Workflow.Domain.Common;
namespace BuildFlow.Workflow.Tests.Notification;
/// <summary>
/// 测试用 no-op 平台通知发布器:转发逻辑由 Host 层实现,单元测试无需真实推送,
/// 此实现空跑返回 0,避免 NotificationService 构造依赖阻断。
/// </summary>
internal sealed class NoOpPlatformNotificationPublisher : IPlatformNotificationPublisher
{
public Task<int> PublishAsync(
string type, string title, string content, string source,
string? relatedId, string? relatedType,
IEnumerable<Guid> recipientUserIds, CancellationToken ct = default)
=> Task.FromResult(0);
}