Beispiel #1
0
        public void Execute_DateTimeToFirstOfMonth_Valid(string value, DateTime expected)
        {
            var function = new DateTimeToFirstOfMonth();
            var result   = function.Evaluate(value);

            Assert.That(result, Is.EqualTo(expected));
        }
Beispiel #2
0
        public void Execute_DateTimeToFirstOfMonth_Valid(object value, DateTime expected)
        {
            var function = new DateTimeToFirstOfMonth();
            var result   = function.Evaluate(value);

            if (expected == new DateTime(1, 1, 1))
            {
                Assert.That(result, Is.Null);
            }
            else
            {
                Assert.That(result, Is.EqualTo(expected));
            }
        }