Rename 29 ImplBacklog test files from .Impltests.cs to .cs to match PortTracker class names
This commit is contained in:
@@ -0,0 +1,427 @@
|
||||
using Shouldly;
|
||||
using ZB.MOM.NatsNet.Server;
|
||||
using ZB.MOM.NatsNet.Server.Internal;
|
||||
|
||||
namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
|
||||
|
||||
public sealed class NatsServerTests
|
||||
{
|
||||
[Fact] // T:2886
|
||||
public void CustomRouterAuthentication_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"CustomRouterAuthentication_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestCustomRouterAuthentication".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2887
|
||||
public void MonitoringNoTimeout_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"MonitoringNoTimeout_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestMonitoringNoTimeout".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2888
|
||||
public void ProfilingNoTimeout_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ProfilingNoTimeout_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestProfilingNoTimeout".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2891
|
||||
public void LameDuckModeInfo_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"LameDuckModeInfo_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestLameDuckModeInfo".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2896
|
||||
public void ClientWriteLoopStall_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ClientWriteLoopStall_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestClientWriteLoopStall".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2898
|
||||
public void ConnectErrorReports_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ConnectErrorReports_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestConnectErrorReports".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2900
|
||||
public void ServerLogsConfigurationFile_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ServerLogsConfigurationFile_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestServerLogsConfigurationFile".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2902
|
||||
public void ServerAuthBlockAndSysAccounts_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ServerAuthBlockAndSysAccounts_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestServerAuthBlockAndSysAccounts".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2903
|
||||
public void ServerConfigLastLineComments_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ServerConfigLastLineComments_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestServerConfigLastLineComments".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2905
|
||||
public void ServerClientURL_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"ServerClientURL_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestServerClientURL".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2907
|
||||
public void BuildinfoFormatRevision_ShouldSucceed()
|
||||
{
|
||||
var goFile = "server/server_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);
|
||||
|
||||
}
|
||||
|
||||
"BuildinfoFormatRevision_ShouldSucceed".ShouldContain("Should");
|
||||
|
||||
"TestBuildinfoFormatRevision".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user