public async Task SendToAllAsync_Model_success()
        {
            var service    = new WebSocketConnectionsService(new FakeIWebLogger());
            var fakeSocket = new FakeWebSocket();

            service.AddConnection(new WebSocketConnection(fakeSocket));

            await service.SendToAllAsync(new ApiNotificationResponseModel <string>("test"), CancellationToken.None);

            Assert.AreEqual("{\"data\":\"test\",\"type\":\"Unknown\"}", fakeSocket.FakeSendItems.LastOrDefault());
        }
        public async Task SendToAllAsync_success()
        {
            var service    = new WebSocketConnectionsService(new FakeIWebLogger());
            var fakeSocket = new FakeWebSocket();

            service.AddConnection(new WebSocketConnection(fakeSocket));

            await service.SendToAllAsync("test", CancellationToken.None);

            Assert.IsTrue(fakeSocket.FakeSendItems.LastOrDefault().StartsWith("test"));
        }
        public async Task SendToAllAsync_ExceptionDueNoContent()
        {
            var logger     = new FakeIWebLogger();
            var service    = new WebSocketConnectionsService(logger);
            var fakeSocket = new FakeWebSocket();

            service.AddConnection(new WebSocketConnection(fakeSocket));

            await service.SendToAllAsync(null as string, CancellationToken.None);

            Assert.AreEqual(1, logger.TrackedInformation.Count);
        }