public void ParseLiteral_NullValueNode() { // arrange var timeSpanType = new TimeSpanType(); NullValueNode literal = NullValueNode.Default; // act object value = timeSpanType.ParseLiteral(literal); // assert Assert.Null(value); }
public void ParseLiteral_StringValueNode(TimeSpanFormat format, string literalValue) { // arrange var timeSpanType = new TimeSpanType(format); var literal = new StringValueNode(literalValue); var expectedTimeSpan = TimeSpan.FromMinutes(5); // act var timeSpan = (TimeSpan)timeSpanType .ParseLiteral(literal); // assert Assert.Equal(expectedTimeSpan, timeSpan); }