示例#1
0
        public void IsInstanceOfType_Invalid2ElementCoordinate_False()
        {
            // arrange
            var type       = new GeoJsonPositionType();
            var coordinate = new ListValueNode(new StringValueNode("1"), new FloatValueNode(1.2));

            // act
            bool?result = type.IsInstanceOfType(coordinate);

            // assert
            Assert.False(result);
        }
示例#2
0
        public void IsInstanceOfType_NullType_True()
        {
            // arrange
            var           type       = new GeoJsonPositionType();
            NullValueNode coordinate = NullValueNode.Default;

            // act
            bool?result = type.IsInstanceOfType(coordinate);

            // assert
            Assert.True(result);
        }
示例#3
0
        public void IsInstanceOfType_Valid2ElementCoordinate_True()
        {
            // arrange
            var type       = new GeoJsonPositionType();
            var coordinate = new ListValueNode(new IntValueNode(1), new FloatValueNode(1.2));

            // act
            bool?result = type.IsInstanceOfType(coordinate);

            // assert
            Assert.True(result);
        }
示例#4
0
        public void IsInstanceOfType_List2ElementCoordinate_False()
        {
            // arrange
            var type       = new GeoJsonPositionType();
            var coordinate = new ListValueNode(
                new ListValueNode(new FloatValueNode(1.1), new FloatValueNode(1.2)));

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

            // assert
            Assert.False(result);
        }
示例#5
0
        public void IsInstanceOfType_Invalid4ElementCoordinate_False()
        {
            // arrange
            var type       = new GeoJsonPositionType();
            var coordinate = new ListValueNode(
                new IntValueNode(1),
                new IntValueNode(2),
                new IntValueNode(3),
                new IntValueNode(4));

            // act
            bool?result = type.IsInstanceOfType(coordinate);

            // assert
            Assert.False(result);
        }