Beispiel #1
0
        public void ServerEventCases()
        {
            var socket = new Mock <WebSocket>();
            var status = ServerEventsController.CalculateServerEventsStatus(false, socket.Object);

            Assert.Equal(ServerEventsStatus.Disabled, status);
            status = ServerEventsController.CalculateServerEventsStatus(true, null);
            Assert.Equal(ServerEventsStatus.Connecting, status);
            status = ServerEventsController.CalculateServerEventsStatus(true, socket.Object);
            Assert.Equal(ServerEventsStatus.Enabled, status);
        }