refactor: 移除平台侧能力并收紧租户隔离

This commit is contained in:
root
2026-01-29 12:06:52 +00:00
parent 86ef0d6033
commit 3297ff26ab
124 changed files with 280 additions and 7231 deletions

View File

@@ -62,7 +62,7 @@ public sealed class CreateAnnouncementCommandValidatorTests
}
[Fact]
public void GivenTenantIdZeroAndNotPlatform_WhenValidate_ThenShouldHaveError()
public void GivenTenantIdZero_WhenValidate_ThenShouldHaveError()
{
// Arrange
var command = AnnouncementTestData.CreateValidCreateCommand() with
@@ -75,7 +75,23 @@ public sealed class CreateAnnouncementCommandValidatorTests
var result = _validator.TestValidate(command);
// Assert
result.ShouldHaveValidationErrorFor(x => x);
result.ShouldHaveValidationErrorFor(x => x.TenantId);
}
[Fact]
public void GivenPlatformPublisherScope_WhenValidate_ThenShouldHaveError()
{
// Arrange
var command = AnnouncementTestData.CreateValidCreateCommand() with
{
PublisherScope = PublisherScope.Platform
};
// Act
var result = _validator.TestValidate(command);
// Assert
result.ShouldHaveValidationErrorFor(x => x.PublisherScope);
}
[Fact]