public void Execute_DateTimeToFirstOfYear_Valid(string value, DateTime expected) { var function = new DateTimeToFirstOfYear(); var result = function.Evaluate(value); Assert.That(result, Is.EqualTo(expected)); }
public void Execute_DateTimeToFirstOfYear_Valid(object value, DateTime expected) { var function = new DateTimeToFirstOfYear(); var result = function.Evaluate(value); if (expected == new DateTime(1, 1, 1)) { Assert.That(result, Is.Null); } else { Assert.That(result, Is.EqualTo(expected)); } }