Example #1
0
        public void TryParse_NoMatch_Empty()
        {
            IgnoreExpressionSection value;
            bool result = IgnoreExpressionSection.TryParse(null, ExpressionSectionType.Hour, out value);

            Assert.False(result);
        }
Example #2
0
        public void TryParse_Match5()
        {
            IgnoreExpressionSection value;
            bool result = IgnoreExpressionSection.TryParse("?", ExpressionSectionType.Month, out value);

            Assert.True(result);
            Assert.AreEqual(ExpressionSectionType.Month, value.Type);
        }
Example #3
0
        public void TryParse_Fails()
        {
            IgnoreExpressionSection value;

            Assert.Throws <InvalidOperationException>(() => IgnoreExpressionSection.TryParse("?", (ExpressionSectionType)99, out value));
        }