Esempio n. 1
0
        public void IsInstanceOfType_Null_Throws()
        {
            // arrange
            var type = new ByteType();

            // act
            // assert
            Assert.Throws <ArgumentNullException>(
                () => type.IsInstanceOfType(null));
        }
Esempio n. 2
0
        public void IsInstanceOfType_StringLiteral_False()
        {
            // arrange
            var type = new ByteType();

            // act
            var result = type.IsInstanceOfType(new FloatValueNode(1M));

            // assert
            Assert.False(result);
        }
Esempio n. 3
0
        public void IsInstanceOfType_NullLiteral_True()
        {
            // arrange
            var type = new ByteType();

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

            // assert
            Assert.True(result);
        }
Esempio n. 4
0
        public void IsInstanceOfType_FloatLiteral_True()
        {
            // arrange
            var type    = new ByteType();
            var literal = new IntValueNode(1);

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

            // assert
            Assert.True(result);
        }