private void Process_MultipleMessages_CharWise()
        {
            var reader = new JsonMessageReader();

            foreach (var data in GetTestData(minMessageCount: 2))
            {
                string json                  = data.Item1;
                var    expectedMessages      = data.Item2;
                var    endIndexOfLogMessages = data.Item3;
                int    messageNumber         = 0;
                for (int i = 0; i < json.Length; i++)
                {
                    var readMessages = reader.Process(json[i].ToString());

                    if (endIndexOfLogMessages.Contains(i))
                    {
                        // message should have been read successfully at this point
                        Assert.Single(readMessages);
                        Assert.Equal(expectedMessages[messageNumber++], readMessages[0]);
                    }
                    else
                    {
                        // message is still incomplete
                        Assert.Empty(readMessages);
                    }
                }

                reader.Reset();
            }
        }
        private void Process_MultipleMessages_AllAtOnce()
        {
            var reader = new JsonMessageReader();

            foreach (var data in GetTestData(minMessageCount: 2))
            {
                string json             = data.Item1;
                var    expectedMessages = data.Item2;
                var    messages         = reader.Process(json);
                Assert.Equal(expectedMessages.Length, messages.Length);
                Assert.Equal(expectedMessages, messages);
            }

            reader.Reset();
        }