예제 #1
0
        public void Execute_DateTimeToFirstOfYear_Valid(string value, DateTime expected)
        {
            var function = new DateTimeToFirstOfYear();
            var result   = function.Evaluate(value);

            Assert.That(result, Is.EqualTo(expected));
        }
예제 #2
0
        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));
            }
        }