HubConnectionHandlerTests.Activity.cs (24)
48var connectionHandler = serviceProvider.GetService<HubConnectionHandler<MethodHub>>();
55AssertHubMethodActivity<MethodHub>(connectActivity, mockHttpRequestActivity, nameof(MethodHub.OnConnectedAsync), linkedActivity: null, activityName: SignalRServerActivitySource.OnConnected);
57await client.SendInvocationAsync(nameof(MethodHub.Echo), "test").DefaultTimeout();
64AssertHubMethodActivity<MethodHub>(invocation1Activity, parent: null, nameof(MethodHub.Echo), mockHttpRequestActivity);
70AssertHubMethodActivity<MethodHub>(invocation2Activity, parent: null, "RenamedMethod", mockHttpRequestActivity);
72await client.SendInvocationAsync(nameof(MethodHub.ActivityMethod)).DefaultTimeout();
76AssertHubMethodActivity<MethodHub>(invocation3Activity, parent: null, nameof(MethodHub.ActivityMethod), mockHttpRequestActivity);
88AssertHubMethodActivity<MethodHub>(disconnectActivity, mockHttpRequestActivity, nameof(MethodHub.OnDisconnectedAsync), linkedActivity: null, activityName: SignalRServerActivitySource.OnDisconnected);
123var connectionHandler = serviceProvider.GetService<HubConnectionHandler<MethodHub>>();
130AssertHubMethodActivity<MethodHub>(connectActivity, mockHttpRequestActivity, nameof(MethodHub.OnConnectedAsync), linkedActivity: null, activityName: SignalRServerActivitySource.OnConnected);
139await client.SendInvocationAsync(nameof(MethodHub.Echo), headers, "test").DefaultTimeout();
146AssertHubMethodActivity<MethodHub>(invocationActivity, parent: null, nameof(MethodHub.Echo), mockHttpRequestActivity);
160AssertHubMethodActivity<MethodHub>(disconnectActivity, mockHttpRequestActivity, nameof(MethodHub.OnDisconnectedAsync), linkedActivity: null, activityName: SignalRServerActivitySource.OnDisconnected);
474var connectionHandler = serviceProvider.GetService<HubConnectionHandler<MethodHub>>();
480_ = await client.InvokeAsync(nameof(MethodHub.MethodThatThrows)).DefaultTimeout();
485AssertHubMethodActivity<MethodHub>(activity, parent: null, nameof(MethodHub.MethodThatThrows),