public void PassesFilter_WithValidMethodArgumentAndParameter_ReturnsBool(DateTime argument, DateTime toTest, DateFilter.DateFilterMethods method, bool expected) { var filter = new DateFilter(method, argument); var result = filter.PassesFilter(toTest); Assert.Equal(expected, result); }
public EpisodePublishDateFilterModification(DateTime date, DateFilter.DateFilterMethods method) : base( "//item/pubDate", new XElementFilterModification(new DateFilter(method, date)) ) { Date = date; Method = method; }
public override string DateFilterMethodToDisplayString(DateFilter.DateFilterMethods method) { switch (method) { case DateFilter.DateFilterMethods.Greater: return("after"); case DateFilter.DateFilterMethods.GreaterEquals: return("at or after"); case DateFilter.DateFilterMethods.Smaller: return("before"); case DateFilter.DateFilterMethods.SmallerEquals: return("at or before"); default: throw new ArgumentException($"DateFilterMethod {method} is unknown."); } }
public abstract string DateFilterMethodToDisplayString(DateFilter.DateFilterMethods method);