public void ParseValue_Wrong_Value_Throws()
        {
            // arrange
            var type  = new LongType();
            var value = "123";

            // act
            // assert
            Assert.Throws <SerializationException>(
                () => type.ParseValue(value));
        }
        public void ParseValue_Nullable()
        {
            // arrange
            var  type  = new LongType();
            long?input = 123;

            // act
            IntValueNode output = (IntValueNode)type.ParseValue(input);

            // assert
            Assert.Equal(123, output.ToDouble());
        }
        public void ParseValue_Null()
        {
            // arrange
            var    type  = new LongType();
            object input = null;

            // act
            object output = type.ParseValue(input);

            // assert
            Assert.IsType <NullValueNode>(output);
        }
        public void ParseValue_MinValue_Violation()
        {
            // arrange
            var  type  = new LongType(1, 100);
            long input = 0;

            // act
            Action action = () => type.ParseValue(input);

            // assert
            Assert.Throws <SerializationException>(action);
        }
        public void ParseValue_MinValue()
        {
            // arrange
            var  type  = new LongType(1, 100);
            long input = 1;

            // act
            var literal = (IntValueNode)type.ParseValue(input);

            // assert
            Assert.Equal(1, literal.ToByte());
        }