Files
natsdotnet/tests/NATS.Server.Core.Tests/Server/UtilitiesErrorConstantsParityBatch2Tests.cs
Joseph Doherty 7fbffffd05 refactor: rename remaining tests to NATS.Server.Core.Tests
- Rename tests/NATS.Server.Tests -> tests/NATS.Server.Core.Tests
- Update solution file, InternalsVisibleTo, and csproj references
- Remove JETSTREAM_INTEGRATION_MATRIX and NATS.NKeys from csproj (moved to JetStream.Tests and Auth.Tests)
- Update all namespaces from NATS.Server.Tests.* to NATS.Server.Core.Tests.*
- Replace private GetFreePort/ReadUntilAsync helpers with TestUtilities calls
- Fix stale namespace in Transport.Tests/NetworkingGoParityTests.cs
2026-03-12 16:14:02 -04:00

29 lines
1.8 KiB
C#

using NATS.Server.Server;
namespace NATS.Server.Core.Tests.Server;
public class UtilitiesErrorConstantsParityBatch2Tests
{
[Fact]
public void Error_constants_match_go_error_literals_batch2()
{
ServerErrorConstants.ErrBadQualifier.ShouldBe("bad qualifier");
ServerErrorConstants.ErrTooManyAccountConnections.ShouldBe("maximum account active connections exceeded");
ServerErrorConstants.ErrTooManySubs.ShouldBe("maximum subscriptions exceeded");
ServerErrorConstants.ErrTooManySubTokens.ShouldBe("subject has exceeded number of tokens limit");
ServerErrorConstants.ErrReservedAccount.ShouldBe("reserved account");
ServerErrorConstants.ErrMissingService.ShouldBe("service missing");
ServerErrorConstants.ErrBadServiceType.ShouldBe("bad service response type");
ServerErrorConstants.ErrBadSampling.ShouldBe("bad sampling percentage, should be 1-100");
ServerErrorConstants.ErrAccountResolverUpdateTooSoon.ShouldBe("account resolver update too soon");
ServerErrorConstants.ErrAccountResolverSameClaims.ShouldBe("account resolver no new claims");
ServerErrorConstants.ErrStreamImportAuthorization.ShouldBe("stream import not authorized");
ServerErrorConstants.ErrStreamImportBadPrefix.ShouldBe("stream import prefix can not contain wildcard tokens");
ServerErrorConstants.ErrStreamImportDuplicate.ShouldBe("stream import already exists");
ServerErrorConstants.ErrServiceImportAuthorization.ShouldBe("service import not authorized");
ServerErrorConstants.ErrImportFormsCycle.ShouldBe("import forms a cycle");
ServerErrorConstants.ErrCycleSearchDepth.ShouldBe("search cycle depth exhausted");
ServerErrorConstants.ErrNoTransforms.ShouldBe("no matching transforms available");
}
}