public void TestCanHandleShouldReturnTrueIfAllRequestsAreFromDifferentDates() { var handler = new TrendDataResultsHandler(); var dataResults = new List<RequestDataResults>(); const int count = 1000; for (int i = 0; i < count; i++) { dataResults.Add(new RequestDataResults { Date = DateTime.Now.AddDays(i) }); } var result = handler.CanHandle(dataResults); Assert.That(result); }
public void TestCanHandleShouldReturnFalseIfAllRequestsAreFromTheSameDate() { var handler = new TrendDataResultsHandler(); var dataResults = new List<RequestDataResults>(); var date = DateTime.Now; int count = 1000; for (int i = 0; i < count; i++) { dataResults.Add(new RequestDataResults { Date = date }); } var result = handler.CanHandle(dataResults); Assert.That(result == false); }