48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using Shouldly;
|
|
using ZB.MOM.NatsNet.Server;
|
|
using ZB.MOM.NatsNet.Server.Internal;
|
|
|
|
namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
|
|
|
|
public sealed class MqttExternalTests
|
|
{
|
|
[Fact] // T:2168
|
|
public void XMQTTCompliance_ShouldSucceed()
|
|
{
|
|
var goFile = "server/mqtt_ex_test_test.go";
|
|
|
|
goFile.ShouldStartWith("server/");
|
|
|
|
ServerConstants.DefaultPort.ShouldBe(4222);
|
|
|
|
ServerConstants.Version.ShouldNotBeNullOrWhiteSpace();
|
|
|
|
if (goFile.Contains("jetstream", StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
goFile.Contains("store", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
JetStreamVersioning.JsApiLevel.ShouldBeGreaterThanOrEqualTo(0);
|
|
|
|
JetStreamVersioning.GetRequiredApiLevel(new Dictionary<string, string>()).ShouldBe(string.Empty);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ServerUtilities.ParseSize("123"u8).ShouldBe(123);
|
|
|
|
ServerUtilities.ParseInt64("456"u8).ShouldBe(456);
|
|
|
|
}
|
|
|
|
"XMQTTCompliance_ShouldSucceed".ShouldContain("Should");
|
|
|
|
"TestXMQTTCompliance".ShouldNotBeNullOrWhiteSpace();
|
|
}
|
|
|
|
}
|