예제 #1
0
        public void InitializeNode()
        {
            // ARRANGE
            var node = new Node();

            // ACT
            int id    = 1;
            var index = new RobotPathFinder.NodePosition()
            {
                X = 1, Y = 2
            };

            node.Initialize(id, index, true);

            // ASSERT
            node.IsInitialized.ShouldBeTrue();
            node.Id.ShouldEqual(1);
            node.Index?.X.ShouldEqual(1);
            node.Index?.Y.ShouldEqual(2);
            node.IsUnavailable.HasValue.ShouldBeTrue();
            node.IsUnavailable?.ShouldBeTrue();
            node.Parent.ShouldBeNull();
        }