I'm making an integration test and want a method to wait until "on method" is called. In C#.
Something like this:
public async Task CheckMethod(){
var hubConnection = GetHubConnection();
connection.On("OnMethod",async () =>{
Log("First");
}
await connection.InvokeAsync("Subscribe", id);
// Something to wait then proceed
Log("Second");
}