예제 #1
0
        public void MatchDateAndTimeTryParseCanOutNull()
        {
            MatchDateAndTime result;

            MatchDateAndTime.TryParse("2014-12-02", out result);
            Assert.IsNull(result);
        }
예제 #2
0
        public void MatchDateAndTimeCanOutValidResult()
        {
            MatchDateAndTime result;

            MatchDateAndTime.TryParse("2016-12-30 19:30", out result);
            Assert.IsTrue($"{result.Value:yyyy-MM-dd HH:mm}" == "2016-12-30 19:30");
        }
예제 #3
0
        public void MatchDateAndTimeTryParseCanReturnFalse()
        {
            MatchDateAndTime result;

            Assert.IsFalse(MatchDateAndTime.TryParse("2020-12-02 19:30", out result));
        }
예제 #4
0
        public void MatchDateAndTimeTryParseCanReturnTrue()
        {
            MatchDateAndTime result;

            Assert.IsTrue(MatchDateAndTime.TryParse("2016-12-30 19:30", out result));
        }