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); }
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); }
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)); }
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("ß")); }