public void MergeLog_DifferentLoggers_Merge() { var gwLog = new Log("GameWarrior", new GameWarriorLogParser(), new FileInput("GW_TestLog1.log")); var mgpLog = new Log("MGP", new Log4NetLogParser(), new FileInput("MGP_TestLog1.log")); var aggregate = new AggregateLog(); aggregate.MergeLog(gwLog); aggregate.MergeLog(mgpLog); var output = aggregate.ToString(); }
public void ToString_PrependsOriginLogName() { var log = new Log("GameWarrior"); log.AddEntries(new[] { _entries[0], _entries[1] }); var agg = new AggregateLog(); agg.MergeLog(log); var result = agg.ToString(); StringAssert.StartsWith(result, "GameWarrior"); }
public void MergeLog_FromDifferentLoggers() { var log1 = new Log("GameWarrior"); log1.AddEntries(new[] { _entries[0], _entries[1] }); var log2 = new Log("MGP"); log2.AddEntries(new[] { _entries[2], _entries[3] }); var agg = new AggregateLog(); agg.MergeLog(log1); agg.MergeLog(log2); Assert.AreEqual(4, agg.NamedEntries.Count); var str = agg.ToString(); StringAssert.Contains(str, "GameWarrior"); StringAssert.Contains(str, "MGP"); }