コード例 #1
0
        public void IsInstanceOfType_Null_Throws()
        {
            // arrange
            var type = new MultiplierPathType();

            // act
            // assert
            Assert.Throws <ArgumentNullException>(
                () => type.IsInstanceOfType(null));
        }
コード例 #2
0
        public void IsInstanceOfType_Wrong_StringValue(string s)
        {
            // arrange
            var type  = new MultiplierPathType();
            var input = new StringValueNode(s);

            // act
            bool result = type.IsInstanceOfType(input);

            // assert
            Assert.False(result);
        }
コード例 #3
0
        public void IsInstanceOfType_NullValueNode()
        {
            // arrange
            var           type  = new MultiplierPathType();
            NullValueNode input = NullValueNode.Default;

            // act
            bool result = type.IsInstanceOfType(input);

            // assert
            Assert.True(result);
        }
コード例 #4
0
        public void IsInstanceOfType_Wrong_ValueNode()
        {
            // arrange
            var type  = new MultiplierPathType();
            var input = new IntValueNode(123456);

            // act
            bool result = type.IsInstanceOfType(input);

            // assert
            Assert.False(result);
        }
コード例 #5
0
        public void IsInstanceOfType_ValueNode()
        {
            // arrange
            var type  = new MultiplierPathType();
            var input = new StringValueNode("_123.456");

            // act
            bool result = type.IsInstanceOfType(input);

            // assert
            Assert.True(result);
        }