protected void LocalDate_ExpectParseResultToMatchNull() { // arrange ScalarType scalar = new LocalDateType(); // act IValueNode result = scalar.ParseResult(null); // assert Assert.Equal(typeof(NullValueNode), result.GetType()); }
protected void LocalDate_ExpectParseResultToThrowSerializationException() { // arrange ScalarType scalar = new LocalDateType(); IValueNode runtimeValue = new IntValueNode(1); // act Exception?result = Record.Exception(() => scalar.ParseResult(runtimeValue)); // assert Assert.IsType <SerializationException>(result); }
protected void LocalDate_ExpectParseResultToMatchStringValue() { // arrange ScalarType scalar = new LocalDateType(); const string valueSyntax = "2018-06-29T08:46:14+04:00"; // act IValueNode result = scalar.ParseResult(valueSyntax); // assert Assert.Equal(typeof(StringValueNode), result.GetType()); }