Exemple #1
0
        public async Task RequestChannelListMessageNotConnected()
        {
            var cs = provider.GetConnections(GablarskiProtocol.Instance);
            var c  = new ConnectionBuffer(cs.Item1);

            await c.DisconnectAsync();

            handler.RequestChanneListMessage(new MessageEventArgs <RequestChannelListMessage> (cs.Item2,
                                                                                               new RequestChannelListMessage()));

            c.AssertNoMessage();
        }
        public async Task RegisterNotConnected()
        {
            var cs = provider.GetConnections(GablarskiProtocol.Instance);
            var s  = new ConnectionBuffer(cs.Item2);
            var c  = new ConnectionBuffer(cs.Item1);

            await s.DisconnectAsync();

            handler.OnRegisterMessage(new MessageEventArgs <RegisterMessage> (s,
                                                                              new RegisterMessage("username", "password")));

            c.AssertNoMessage();
        }