public void PartitionSpaceEventArgsConstructorTest()
        {
            BaseMap map = null; // TODO: 初始化为适当的值
            PartitionSpaceEventArgs target = new PartitionSpaceEventArgs(map);

            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }
        public void ProcessPartitionSpaceTest()
        {
            IPartitionSpace         target    = CreateIPartitionSpace(); // TODO: 初始化为适当的值
            object                  sender    = null;                    // TODO: 初始化为适当的值
            PartitionSpaceEventArgs eventArgs = null;                    // TODO: 初始化为适当的值

            target.ProcessPartitionSpace(sender, eventArgs);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
 public void PartitionSpaceTest()
 {
     BaseMap map = null; // TODO: 初始化为适当的值
     PartitionSpaceEventArgs target = new PartitionSpaceEventArgs( map ); // TODO: 初始化为适当的值
     MapSpaceNode[, ,] expected = null; // TODO: 初始化为适当的值
     MapSpaceNode[, ,] actual;
     target.PartitionSpace = expected;
     actual = target.PartitionSpace;
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
        public void PartitionSpaceTest()
        {
            BaseMap map = null;                                                // TODO: 初始化为适当的值
            PartitionSpaceEventArgs target = new PartitionSpaceEventArgs(map); // TODO: 初始化为适当的值

            MapSpaceNode[, ,] expected = null;                                 // TODO: 初始化为适当的值
            MapSpaceNode[, ,] actual;
            target.PartitionSpace = expected;
            actual = target.PartitionSpace;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
Example #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventArgs"></param>
        public void ProcessPartitionSpace(object sender, PartitionSpaceEventArgs eventArgs)
        {
            eventArgs.PartitionSpace = new MapSpaceNode[MAX_NUMBER_OF_GRIDS, MAX_NUMBER_OF_GRIDS, 0];

            for (int iIndexX = 0; iIndexX < MAX_NUMBER_OF_GRIDS; iIndexX++)
            {
                for (int iIndexY = 0; iIndexY < MAX_NUMBER_OF_GRIDS; iIndexY++)
                {
                    Point3D startPoint3D = new Point3D();
                    startPoint3D.X = eventArgs.Map.MapRectangle.Start.X + (iIndexX * SIZE_OF_GRIDS);
                    startPoint3D.Y = eventArgs.Map.MapRectangle.Start.Y + (iIndexY * SIZE_OF_GRIDS);
                    startPoint3D.Z = eventArgs.Map.MapRectangle.Start.Z;

                    Point3D endPoint3D = new Point3D();
                    endPoint3D.X = startPoint3D.X + SIZE_OF_GRIDS;
                    endPoint3D.Y = startPoint3D.Y + SIZE_OF_GRIDS;
                    endPoint3D.Z = eventArgs.Map.MapRectangle.End.Z;

                    eventArgs.PartitionSpace[iIndexX, iIndexY, 0] = new MapSpaceNode(new Rectangle3D(startPoint3D, endPoint3D));
                }
            }
        }
 public void PartitionSpaceEventArgsConstructorTest()
 {
     BaseMap map = null; // TODO: 初始化为适当的值
     PartitionSpaceEventArgs target = new PartitionSpaceEventArgs( map );
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventArgs"></param>
        public void ProcessPartitionSpace( object sender, PartitionSpaceEventArgs eventArgs )
        {
            eventArgs.PartitionSpace = new MapSpaceNode[MAX_NUMBER_OF_GRIDS, MAX_NUMBER_OF_GRIDS, 0];

            for ( int iIndexX = 0; iIndexX < MAX_NUMBER_OF_GRIDS; iIndexX++ )
            {
                for ( int iIndexY = 0; iIndexY < MAX_NUMBER_OF_GRIDS; iIndexY++ )
                {
                    Point3D startPoint3D = new Point3D();
                    startPoint3D.X = eventArgs.Map.MapRectangle.Start.X + ( iIndexX * SIZE_OF_GRIDS );
                    startPoint3D.Y = eventArgs.Map.MapRectangle.Start.Y + ( iIndexY * SIZE_OF_GRIDS );
                    startPoint3D.Z = eventArgs.Map.MapRectangle.Start.Z;

                    Point3D endPoint3D = new Point3D();
                    endPoint3D.X = startPoint3D.X + SIZE_OF_GRIDS;
                    endPoint3D.Y = startPoint3D.Y + SIZE_OF_GRIDS;
                    endPoint3D.Z = eventArgs.Map.MapRectangle.End.Z;

                    eventArgs.PartitionSpace[iIndexX, iIndexY, 0] = new MapSpaceNode( new Rectangle3D( startPoint3D, endPoint3D ) );
                }
            }
        }