From 8a672ace9169ed2ab9082f847a175ee14a44473b Mon Sep 17 00:00:00 2001 From: Shargon Date: Thu, 17 Oct 2019 17:49:36 +0200 Subject: [PATCH] ClientName --- tests/TuringMachine.Core.Tests/FuzzerTest.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/TuringMachine.Core.Tests/FuzzerTest.cs b/tests/TuringMachine.Core.Tests/FuzzerTest.cs index d8fc8c4..b8da7d4 100644 --- a/tests/TuringMachine.Core.Tests/FuzzerTest.cs +++ b/tests/TuringMachine.Core.Tests/FuzzerTest.cs @@ -67,6 +67,10 @@ private void Test(FuzzerConnectionBase serverConnection, FuzzerConnectionBase cl using (var server = new FuzzerServer()) using (var client = new FuzzerClient()) { + // Change name + + client.PublicName = "TestClient_" + Guid.NewGuid().ToString(); + // Ensure no error client.SendLog(null); @@ -143,7 +147,7 @@ private void Test(FuzzerConnectionBase serverConnection, FuzzerConnectionBase cl Assert.IsTrue(waitInput.WaitOne(TimeSpan.FromSeconds(10)), "Waiting for inputs"); Assert.AreEqual(1, server.Connections.Count); - Assert.IsTrue(!string.IsNullOrEmpty(server.Connections.Values.FirstOrDefault()?.Source.Description)); + Assert.IsTrue(server.Connections.Values.FirstOrDefault()?.Source.Description.Contains(client.PublicName)); Assert.AreNotEqual(Guid.Empty, server.Connections.Values.FirstOrDefault()?.Source.Id); Assert.AreNotEqual(Guid.Empty, server.Connections.Values.FirstOrDefault()?.Id);