@@ -44,7 +44,7 @@ public HubConnectionTests(ServerFixture<Startup> serverFixture, ITestOutputHelpe
44
44
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
45
45
public async Task CheckFixedMessage ( IHubProtocol protocol , TransportType transportType , string path )
46
46
{
47
- using ( StartLog ( out var loggerFactory ) )
47
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( CheckFixedMessage ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
48
48
{
49
49
var connection = new HubConnectionBuilder ( )
50
50
. WithUrl ( _serverFixture . Url + path )
@@ -77,7 +77,7 @@ public async Task CheckFixedMessage(IHubProtocol protocol, TransportType transpo
77
77
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
78
78
public async Task CanSendAndReceiveMessage ( IHubProtocol protocol , TransportType transportType , string path )
79
79
{
80
- using ( StartLog ( out var loggerFactory ) )
80
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( CanSendAndReceiveMessage ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
81
81
{
82
82
const string originalMessage = "SignalR" ;
83
83
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
@@ -106,7 +106,7 @@ public async Task CanSendAndReceiveMessage(IHubProtocol protocol, TransportType
106
106
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
107
107
public async Task MethodsAreCaseInsensitive ( IHubProtocol protocol , TransportType transportType , string path )
108
108
{
109
- using ( StartLog ( out var loggerFactory ) )
109
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( MethodsAreCaseInsensitive ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
110
110
{
111
111
const string originalMessage = "SignalR" ;
112
112
var uriString = "http://test/" + path ;
@@ -136,7 +136,7 @@ public async Task MethodsAreCaseInsensitive(IHubProtocol protocol, TransportType
136
136
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
137
137
public async Task CanInvokeClientMethodFromServer ( IHubProtocol protocol , TransportType transportType , string path )
138
138
{
139
- using ( StartLog ( out var loggerFactory ) )
139
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( CanInvokeClientMethodFromServer ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
140
140
{
141
141
const string originalMessage = "SignalR" ;
142
142
@@ -169,7 +169,7 @@ public async Task CanInvokeClientMethodFromServer(IHubProtocol protocol, Transpo
169
169
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
170
170
public async Task InvokeNonExistantClientMethodFromServer ( IHubProtocol protocol , TransportType transportType , string path )
171
171
{
172
- using ( StartLog ( out var loggerFactory ) )
172
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( InvokeNonExistantClientMethodFromServer ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
173
173
{
174
174
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
175
175
var connection = new HubConnection ( httpConnection , protocol , loggerFactory ) ;
@@ -191,7 +191,7 @@ public async Task InvokeNonExistantClientMethodFromServer(IHubProtocol protocol,
191
191
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
192
192
public async Task CanStreamClientMethodFromServer ( IHubProtocol protocol , TransportType transportType , string path )
193
193
{
194
- using ( StartLog ( out var loggerFactory ) )
194
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( CanStreamClientMethodFromServer ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
195
195
{
196
196
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
197
197
var connection = new HubConnection ( httpConnection , protocol , loggerFactory ) ;
@@ -220,7 +220,7 @@ public async Task CanStreamClientMethodFromServer(IHubProtocol protocol, Transpo
220
220
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
221
221
public async Task CanCloseStreamMethodEarly ( IHubProtocol protocol , TransportType transportType , string path )
222
222
{
223
- using ( StartLog ( out var loggerFactory ) )
223
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( CanCloseStreamMethodEarly ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
224
224
{
225
225
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
226
226
var connection = new HubConnection ( httpConnection , protocol , loggerFactory ) ;
@@ -255,7 +255,7 @@ public async Task CanCloseStreamMethodEarly(IHubProtocol protocol, TransportType
255
255
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
256
256
public async Task StreamDoesNotStartIfTokenAlreadyCanceled ( IHubProtocol protocol , TransportType transportType , string path )
257
257
{
258
- using ( StartLog ( out var loggerFactory ) )
258
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( StreamDoesNotStartIfTokenAlreadyCanceled ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
259
259
{
260
260
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
261
261
var connection = new HubConnection ( httpConnection , protocol , loggerFactory ) ;
@@ -286,7 +286,7 @@ public async Task StreamDoesNotStartIfTokenAlreadyCanceled(IHubProtocol protocol
286
286
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
287
287
public async Task ExceptionFromStreamingSentToClient ( IHubProtocol protocol , TransportType transportType , string path )
288
288
{
289
- using ( StartLog ( out var loggerFactory ) )
289
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ExceptionFromStreamingSentToClient ) } _ { protocol . Name } _ { transportType } _ { path . TrimStart ( '/' ) } " ) )
290
290
{
291
291
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + path ) , transportType , loggerFactory ) ;
292
292
var connection = new HubConnection ( httpConnection , protocol , loggerFactory ) ;
@@ -314,7 +314,7 @@ public async Task ExceptionFromStreamingSentToClient(IHubProtocol protocol, Tran
314
314
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
315
315
public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolved ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
316
316
{
317
- using ( StartLog ( out var loggerFactory ) )
317
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionIfHubMethodCannotBeResolved ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
318
318
{
319
319
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
320
320
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -341,7 +341,7 @@ public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolved(IHubProtoc
341
341
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
342
342
public async Task ServerThrowsHubExceptionOnHubMethodArgumentCountMismatch ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
343
343
{
344
- using ( StartLog ( out var loggerFactory ) )
344
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionOnHubMethodArgumentCountMismatch ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
345
345
{
346
346
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
347
347
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -368,7 +368,7 @@ public async Task ServerThrowsHubExceptionOnHubMethodArgumentCountMismatch(IHubP
368
368
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
369
369
public async Task ServerThrowsHubExceptionOnHubMethodArgumentTypeMismatch ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
370
370
{
371
- using ( StartLog ( out var loggerFactory ) )
371
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionOnHubMethodArgumentTypeMismatch ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
372
372
{
373
373
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
374
374
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -395,7 +395,7 @@ public async Task ServerThrowsHubExceptionOnHubMethodArgumentTypeMismatch(IHubPr
395
395
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
396
396
public async Task ServerThrowsHubExceptionIfStreamingHubMethodCannotBeResolved ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
397
397
{
398
- using ( StartLog ( out var loggerFactory ) )
398
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionIfStreamingHubMethodCannotBeResolved ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
399
399
{
400
400
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
401
401
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -423,7 +423,7 @@ public async Task ServerThrowsHubExceptionIfStreamingHubMethodCannotBeResolved(I
423
423
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
424
424
public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentCountMismatch ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
425
425
{
426
- using ( StartLog ( out var loggerFactory ) )
426
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionOnStreamingHubMethodArgumentCountMismatch ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
427
427
{
428
428
loggerFactory . AddConsole ( LogLevel . Trace ) ;
429
429
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
@@ -452,7 +452,7 @@ public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentCountMisma
452
452
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
453
453
public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentTypeMismatch ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
454
454
{
455
- using ( StartLog ( out var loggerFactory ) )
455
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionOnStreamingHubMethodArgumentTypeMismatch ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
456
456
{
457
457
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
458
458
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -480,7 +480,7 @@ public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentTypeMismat
480
480
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
481
481
public async Task ServerThrowsHubExceptionIfNonStreamMethodInvokedWithStreamAsync ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
482
482
{
483
- using ( StartLog ( out var loggerFactory ) )
483
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionIfNonStreamMethodInvokedWithStreamAsync ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
484
484
{
485
485
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
486
486
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -507,7 +507,7 @@ public async Task ServerThrowsHubExceptionIfNonStreamMethodInvokedWithStreamAsyn
507
507
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
508
508
public async Task ServerThrowsHubExceptionIfStreamMethodInvokedWithInvoke ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
509
509
{
510
- using ( StartLog ( out var loggerFactory ) )
510
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionIfStreamMethodInvokedWithInvoke ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
511
511
{
512
512
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
513
513
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -534,7 +534,7 @@ public async Task ServerThrowsHubExceptionIfStreamMethodInvokedWithInvoke(IHubPr
534
534
[ MemberData ( nameof ( HubProtocolsAndTransportsAndHubPaths ) ) ]
535
535
public async Task ServerThrowsHubExceptionIfBuildingAsyncEnumeratorIsNotPossible ( IHubProtocol hubProtocol , TransportType transportType , string hubPath )
536
536
{
537
- using ( StartLog ( out var loggerFactory ) )
537
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ServerThrowsHubExceptionIfBuildingAsyncEnumeratorIsNotPossible ) } _ { hubProtocol . Name } _ { transportType } _ { hubPath . TrimStart ( '/' ) } " ) )
538
538
{
539
539
var httpConnection = new HttpConnection ( new Uri ( _serverFixture . Url + hubPath ) , transportType , loggerFactory ) ;
540
540
var connection = new HubConnection ( httpConnection , hubProtocol , loggerFactory ) ;
@@ -561,7 +561,7 @@ public async Task ServerThrowsHubExceptionIfBuildingAsyncEnumeratorIsNotPossible
561
561
[ MemberData ( nameof ( TransportTypes ) ) ]
562
562
public async Task ClientCanUseJwtBearerTokenForAuthentication ( TransportType transportType )
563
563
{
564
- using ( StartLog ( out var loggerFactory ) )
564
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ClientCanUseJwtBearerTokenForAuthentication ) } _ { transportType } " ) )
565
565
{
566
566
var httpResponse = await new HttpClient ( ) . GetAsync ( _serverFixture . Url + "/generateJwtToken" ) ;
567
567
httpResponse . EnsureSuccessStatusCode ( ) ;
@@ -595,7 +595,7 @@ public async Task ClientCanUseJwtBearerTokenForAuthentication(TransportType tran
595
595
[ MemberData ( nameof ( TransportTypes ) ) ]
596
596
public async Task ClientCanSendHeaders ( TransportType transportType )
597
597
{
598
- using ( StartLog ( out var loggerFactory ) )
598
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( ClientCanSendHeaders ) } _ { transportType } " ) )
599
599
{
600
600
var hubConnection = new HubConnectionBuilder ( )
601
601
. WithUrl ( _serverFixture . Url + "/default" )
@@ -625,7 +625,7 @@ public async Task ClientCanSendHeaders(TransportType transportType)
625
625
[ Fact ]
626
626
public async Task WebSocketOptionsAreApplied ( )
627
627
{
628
- using ( StartLog ( out var loggerFactory ) )
628
+ using ( StartLog ( out var loggerFactory , $ " { nameof ( WebSocketOptionsAreApplied ) } " ) )
629
629
{
630
630
// System.Net has a TransportType type which means we need to fully-qualify this rather than 'use' the namespace
631
631
var cookieJar = new System . Net . CookieContainer ( ) ;
0 commit comments