Esempio n. 1
0
        public void ParseValue_Wrong_Value_Throws()
        {
            // arrange
            var    type  = new IdType();
            object input = 123.456;

            // act
            // assert
            Assert.Throws <ArgumentException>(() => type.ParseValue(input));
        }
Esempio n. 2
0
        public void ParseValue_String()
        {
            // arrange
            var    type  = new IdType();
            object input = "hello";

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

            // assert
            Assert.IsType <StringValueNode>(output);
        }
Esempio n. 3
0
        public void ParseValue_Null()
        {
            // arrange
            var    type  = new IdType();
            object input = null;

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

            // assert
            Assert.IsType <NullValueNode>(output);
        }
Esempio n. 4
0
        public void ParseValue_Int()
        {
            // arrange
            var    type  = new IdType();
            object input = 1234;

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

            // assert
            Assert.IsType <IntValueNode>(output);
        }