Example #1
0
        public void ForkMap_Point_0_2_is_not_path_terminus()
        {
            // arrange
            var map = new ForkMap().GetMap();

            // act
            var point = map.GetPoint(0, 2);

            // assert
            point.PathTerminusDirection.Should().BeNull();
        }
Example #2
0
        public void ForkMap_Point_0_1_is_path_terminus_north()
        {
            // arrange
            var map = new ForkMap().GetMap();

            // act
            var point = map.GetPoint(0, 1);

            // assert
            point.PathTerminusDirection.Should().Be(Directions.North);
        }
Example #3
0
        public void ForkMap_Point_0_1_has_no_junction()
        {
            // arrange
            var map = new ForkMap().GetMap();

            // act
            var point = map.GetPoint(0, 1);

            // assert
            point.HasJunction.Should().BeFalse();
        }
Example #4
0
        public void ForkMap_Point_5_2_has_crossroad_junction()
        {
            // arrange
            var map   = new ForkMap().GetMap();
            var point = map.GetPoint(5, 2);

            // act
            var junction = point.GetJunction();

            // assert
            junction.Type.Should().Be(Junction.JunctionTypes.Crossroad);
        }
Example #5
0
        public void ForkMap_Point_0_2_has_T_junction()
        {
            // arrange
            var map   = new ForkMap().GetMap();
            var point = map.GetPoint(0, 2);

            // act
            var junction = point.GetJunction();

            // assert
            junction.Type.Should().Be(Junction.JunctionTypes.TJunction);
        }
Example #6
0
        public void ForkMap_Point_5_4_has_righthand_junction_east()
        {
            // arrange
            var map   = new ForkMap().GetMap();
            var point = map.GetPoint(5, 4);

            // act
            var junction = point.GetJunction();

            // assert
            junction.Type.Should().Be(Junction.JunctionTypes.Righthand);
            junction.FromDirection.Should().Be(Directions.East);
        }