From d5a4d9b8c5f427f8aa0f75c012e00da053056c05 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 12 Apr 2018 16:48:18 -0700 Subject: [PATCH] Update usage of TestSink --- .../HttpConnectionTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Client.Tests/HttpConnectionTests.cs b/test/Microsoft.AspNetCore.SignalR.Client.Tests/HttpConnectionTests.cs index cb8bb48daf..ce4f4d4bc7 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.Tests/HttpConnectionTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.Tests/HttpConnectionTests.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Linq; using System.Net; using System.Net.Http; using System.Security.Cryptography.X509Certificates; @@ -118,9 +119,11 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests // ignore connection error } - Assert.Equal(2, testSink.Writes.Count); - Assert.Equal("SendingHttpRequest", testSink.Writes[0].EventId.Name); - Assert.Equal("UnsuccessfulHttpResponse", testSink.Writes[1].EventId.Name); + var writeList = testSink.Writes.ToList(); + + Assert.Equal(2, writeList.Count); + Assert.Equal("SendingHttpRequest", writeList[0].EventId.Name); + Assert.Equal("UnsuccessfulHttpResponse", writeList[1].EventId.Name); } } }