public List <LogEntry> GetLog(bool includeInformation = false, bool includeWarnings = false, bool includeErrors = false, int takeCount = 1000) { var filter = new LogEntryFilter { IncludeInformation = includeInformation, IncludeWarnings = includeWarnings, IncludeErrors = includeErrors, TakeCount = takeCount }; return(_logService.GetEntries(filter)); }
public void TestMethod() { // Arrange string pattern = @"from: "; List <string> filteredEntries = new List <string>(); LogEntryFilter filter = new LogEntryFilter(pattern, (message) => { filteredEntries.Add(message); }); // Act foreach (string entry in TestData.ISsLogEntries) { filter.process(entry); } // Assert Assert.AreEqual(4, filteredEntries.Count); }