public void DroppedTrafficFromSourceInTimeRangeTest() { var logQueryFactory = new LogQueryFactory(); var query = logQueryFactory.CreateGetBlockedTrafficFromSourceWithinTimeRange( IPAddress.Parse("10.0.10.5"), DateTime.Now.AddHours(-4), DateTime.Now); Assert.IsFalse(string.IsNullOrEmpty(query)); }
public void TimeRecieveUpdateTests() { const string QueryWithBothTimeAttributes = "( addr.src in 10.121.148.166 ) and ( action eq deny ) and ( receive_time leq '2015/03/25 16:29:02' ) or ( receive_time leq '2015/02/25 16:29:02' )"; var queryFactory = new LogQueryFactory(); var newDateTime = DateTime.Now; var result = queryFactory.UpdateGetTrafficWithUpperTimeRange(QueryWithBothTimeAttributes, DateTime.Now); Assert.IsTrue(result.Contains(string.Format(PanosRecieveTimeLeqClauseFormat, newDateTime))); }