public void ByUser() { AuditFilterBase filter = AuditFilters.ByUser("User #1"); Assert.IsTrue(filter.CheckFilter(record1), "User not included"); Assert.IsFalse(filter.CheckFilter(record2), "User not excluded"); }
public void ByUserAndProject() { AuditFilterBase filter = AuditFilters.ByUser("User #1") .ByProject("Project #1"); Assert.IsTrue(filter.CheckFilter(record1), "Project not included"); Assert.IsFalse(filter.CheckFilter(record3), "Project not excluded"); }
public void ReadSomeFilteredEvents() { FileXmlReader reader = new FileXmlReader(); reader.AuditFileLocation = GenerateAuditFile(); List <AuditRecord> records = reader.Read(0, 1, AuditFilters.ByUser("User #1")); Assert.AreEqual(1, records.Count, "Incorrect number of records returned"); }
public void Combined() { AuditFilterBase filter = AuditFilters.Combine( AuditFilters.ByProject("Project #1"), AuditFilters.ByUser("User #2")); Assert.IsTrue(filter.CheckFilter(record1), "Project not included"); Assert.IsTrue(filter.CheckFilter(record2), "Project not included"); Assert.IsFalse(filter.CheckFilter(record3), "Project not excluded"); }