Beispiel #1
0
        public void LocalTime_ExpectDeserializeInvalidStringToDateTime()
        {
            // arrange
            ScalarType scalar = new LocalTimeType();

            // act
            var success = scalar.TryDeserialize("abc", out object?_);

            // assert
            Assert.False(success);
        }
Beispiel #2
0
        public void LocalTime_ExpectDeserializeNullToNull()
        {
            // arrange
            ScalarType scalar = new LocalTimeType();

            // act
            var success = scalar.TryDeserialize(null, out object?deserialized);

            // assert
            Assert.True(success);
            Assert.Null(deserialized);
        }
Beispiel #3
0
        public void LocalTime_ExpectDeserializeNullableDateTimeToDateTime()
        {
            // arrange
            ScalarType scalar = new LocalTimeType();
            DateTime?  time   = null;

            // act
            var success = scalar.TryDeserialize(time, out object?deserialized);

            // assert
            Assert.True(success);
            Assert.Null(deserialized);
        }