public void ValidateInput(IPartParser parser, string input, bool isUpperLimit, DateTime? expected) {
            Trace.WriteLine(String.Format("Now: {0}", _now));
            var match = parser.Regex.Match(input);
            if (!match.Success) {
                Assert.Null(expected);
                return;
            }

            var result = parser.Parse(match, _now, isUpperLimit);
            if (expected == null) {
                Assert.Null(result);
            } else {
                Assert.Equal(expected, result.Value);
            }
        }
        public void ValidateInput(IPartParser parser, string input, bool isUpperLimit, DateTimeOffset?expected)
        {
            _logger.LogInformation("Input: {Input}, Now: {Now}, IsUpperLimit: {IsUpperLimit}, Expected: {Expected}", input, _now, isUpperLimit, expected);
            var match = parser.Regex.Match(input);

            if (!match.Success)
            {
                Assert.Null(expected);
                return;
            }

            var result = parser.Parse(match, _now, isUpperLimit);

            if (expected == null)
            {
                Assert.Null(result);
            }
            else
            {
                Assert.Equal(expected, result.Value);
            }
        }
        public void ValidateInput(IPartParser parser, string input, bool isUpperLimit, DateTime?expected)
        {
            Trace.WriteLine(String.Format("Now: {0}", _now));
            var match = parser.Regex.Match(input);

            if (!match.Success)
            {
                Assert.Null(expected);
                return;
            }

            var result = parser.Parse(match, _now, isUpperLimit);

            if (expected == null)
            {
                Assert.Null(result);
            }
            else
            {
                Assert.Equal(expected, result.Value);
            }
        }