public void PassesFilter_WithIntAndMethod_ReturnsTrue(int toTest, IntFilter.IntFilterMethods method, bool expected) { var filter = new IntFilter(method, 10); var result = filter.PassesFilter(toTest); Assert.Equal(expected, result); }
public override string IntFilterMethodToDisplayString(IntFilter.IntFilterMethods method) { switch (method) { case IntFilter.IntFilterMethods.Equal: return("equals"); case IntFilter.IntFilterMethods.Greater: return("more than"); case IntFilter.IntFilterMethods.GreaterEquals: return("more or equal than"); case IntFilter.IntFilterMethods.Smaller: return("less than"); case IntFilter.IntFilterMethods.SmallerEquals: return("less or equal than"); case IntFilter.IntFilterMethods.Unequal: return("unequal to"); default: throw new ArgumentException($"IntFilterMethod {method} is unknown."); } }
public abstract string IntFilterMethodToDisplayString(IntFilter.IntFilterMethods method);