示例#1
0
        public void ProcessLogFiles()
        {
            var list = new List <LogEntry>();

            LogReader.ProcessLogFiles(new[] { new FileInfo(this.wellFormedLogFile) }, entry => list.Add(entry), (i, i1, arg3) => { }, exception1 => Assert.Fail(exception1.ToString()), true, () => false);

            Assert.AreEqual(40950, list.Count);
        }
示例#2
0
        public void BadValuesLogFile()
        {
            var list = new List <LogEntry>();

            LogReader.ProcessLogFiles(new[] { new FileInfo(this.badValuesLogFile) }, entry => list.Add(entry), (i, i1, arg3) => { }, exception1 => Console.WriteLine(exception1.ToString()), true, () => false);

            Assert.AreEqual(2, list.Count);
        }
示例#3
0
        public void ProcessLogFiles_OneEntry()
        {
            var list = new List <LogEntry>();

            LogReader.ProcessLogFiles(new[] { new FileInfo(this.oneLogEntry) }, entry => list.Add(entry), (i, i1, arg3) => { }, exception1 => Assert.Fail(exception1.ToString()), true, () => false);

            Console.Out.WriteLine(JsonConvert.SerializeObject(list, Formatting.Indented));

            Assert.That(list, Has.Count.EqualTo(1));
        }
示例#4
0
        public void Umlaute()
        {
            var list = new List <LogEntry>();

            LogReader.ProcessLogFiles(new[] { new FileInfo(this.umlauteLogFile) }, entry => list.Add(entry), (i, i1, arg3) => { }, exception1 => Console.WriteLine(exception1.ToString()), true, () => false);

            Assert.AreEqual(true, list.First().UserAgent.Contains("ä"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("ö"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("ü"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("Ä"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("Ö"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("Ü"));
            Assert.AreEqual(true, list.First().UserAgent.Contains("ß"));
        }