Example #1
0
        public void SplitToLogEventParseItems()
        {
            var sut = new FlatLogParser();

            var text  = "123";
            var items = sut.SplitToLogEventParseItems(text).ToList();

            Assert.That(items.Count, Is.EqualTo(1));
            Assert.AreEqual(new LogEventParseItem(0, text.Length), items.First());
        }
Example #2
0
        public void SplitToLogEventParseItems_TwoItems()
        {
            var sut = new FlatLogParser();

            var text  = "123\n34";
            var items = sut.SplitToLogEventParseItems(text).ToList();

            Assert.That(items.Count, Is.EqualTo(2));
            Assert.AreEqual(new LogEventParseItem(0, 3), items[0]);
            Assert.AreEqual(new LogEventParseItem(4, 2), items[1]);
        }