Example #1
0
        public void Reconnect_CallsDisconnectAndConnect()
        {
            var socketMock = Substitute.For <ISymSocket>();
            var session    = new SymSession(socketMock, 10);

            session.Connect("symitar", 23);

            session.Reconnect();

            socketMock.Received().Disconnect();
            socketMock.Received().Connect("symitar", 23);
        }
Example #2
0
        public void Reconnect_CallsDisconnectAndConnect()
        {
            var socketMock = Substitute.For<ISymSocket>();
            var session = new SymSession(socketMock, 10);
            session.Connect("symitar", 23);

            session.Reconnect();

            socketMock.Received().Disconnect();
            socketMock.Received().Connect("symitar", 23);
        }