示例#1
0
        protected void LocalDate_ExpectParseResultToMatchNull()
        {
            // arrange
            ScalarType scalar = new LocalDateType();

            // act
            IValueNode result = scalar.ParseResult(null);

            // assert
            Assert.Equal(typeof(NullValueNode), result.GetType());
        }
示例#2
0
        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);
        }
示例#3
0
        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());
        }