Пример #1
0
        public void IsInstanceOfType_Null_Throws()
        {
            // arrange
            var type = new DecimalType();

            // act
            // assert
            Assert.Throws <ArgumentNullException>(
                () => type.IsInstanceOfType(null));
        }
Пример #2
0
        public void IsInstanceOfType_StringLiteral_False()
        {
            // arrange
            var type = new DecimalType();

            // act
            var result = type.IsInstanceOfType(new StringValueNode("123"));

            // assert
            Assert.False(result);
        }
Пример #3
0
        public void IsInstanceOfType_NullLiteral_True()
        {
            // arrange
            var type = new DecimalType();

            // act
            var result = type.IsInstanceOfType(NullValueNode.Default);

            // assert
            Assert.True(result);
        }
Пример #4
0
        public void IsInstanceOfType_IntLiteral_True()
        {
            // arrange
            var type = new DecimalType();

            // act
            var result = type.IsInstanceOfType(new IntValueNode(123));

            // assert
            Assert.True(result);
        }
Пример #5
0
        public void IsInstanceOfType_FloatLiteral_True()
        {
            // arrange
            var type = new DecimalType();

            // act
            var result = type.IsInstanceOfType(CreateExponentialLiteral());

            // assert
            Assert.True(result);
        }