public async Task ShouldEmitTheFollowingStates(ChannelState state) { ChannelState newState = ChannelState.Initialized; _channel.On(x => { newState = x.Current; Done(); }); (_channel as RealtimeChannel).SetChannelState(state); WaitOne(); _channel.State.Should().Be(state); newState.Should().Be(state); }