diff --git a/tests/NRedisStack.Tests/Core Commands/CoreTests.cs b/tests/NRedisStack.Tests/Core Commands/CoreTests.cs index 8088e88f..61b8ec41 100644 --- a/tests/NRedisStack.Tests/Core Commands/CoreTests.cs +++ b/tests/NRedisStack.Tests/Core Commands/CoreTests.cs @@ -25,7 +25,7 @@ public void TestSimpleSetInfo(string endpointId) db.ClientSetInfo(SetInfoAttr.LibraryVersion, "1.2.3"); var info = db.Execute("CLIENT", "INFO").ToString(); - Assert.EndsWith($"lib-name=TestLibraryName lib-ver=1.2.3\n", info); + Assert.Contains($"lib-name=TestLibraryName lib-ver=1.2.3", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")] @@ -38,7 +38,7 @@ public async Task TestSimpleSetInfoAsync(string endpointId) await db.ClientSetInfoAsync(SetInfoAttr.LibraryVersion, "1.2.3"); var info = db.Execute("CLIENT", "INFO").ToString(); - Assert.EndsWith($"lib-name=TestLibraryName lib-ver=1.2.3\n", info); + Assert.Contains($"lib-name=TestLibraryName lib-ver=1.2.3", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")] @@ -51,7 +51,7 @@ public void TestSetInfoDefaultValue(string endpointId) db.Execute(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version. var info = db.Execute("CLIENT", "INFO").ToString(); - Assert.EndsWith($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info); + Assert.Contains($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")] @@ -64,7 +64,7 @@ public async Task TestSetInfoDefaultValueAsync(string endpointId) await db.ExecuteAsync(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version. var info = (await db.ExecuteAsync("CLIENT", "INFO")).ToString(); - Assert.EndsWith($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info); + Assert.Contains($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")] @@ -77,7 +77,7 @@ public void TestSetInfoWithValue(string endpointId) db.Execute(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version. var info = db.Execute("CLIENT", "INFO").ToString(); - Assert.EndsWith($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info); + Assert.Contains($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")] @@ -90,7 +90,7 @@ public async Task TestSetInfoWithValueAsync(string endpointId) await db.ExecuteAsync(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version. var info = (await db.ExecuteAsync("CLIENT", "INFO")).ToString(); - Assert.EndsWith($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info); + Assert.Contains($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info); } [SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]