public void LastDay(int year, int month, int day, bool expected) { var rule = new EveryDayRule().TheLastOccurenceInTheMonth(); var date = new DateTime(year, month, day); Process(rule).IsMatch(date).Should().Be(expected); }
public void AnIEnumerableRuleIsDeserializedAsIRule() { var rule = new EveryDayRule().Starting(new DateTime(2015, 1, 1)); var result = RuleSerializer.Instance.Serialize(rule); var hydratedRule = RuleSerializer.Instance.Deserialize(result); hydratedRule.Should().BeAssignableTo <IEnumerableRule>(); }