public void When_GetValue_Then_ValidValueIsReturned(int heightIndex, string expected)
        {
            // act
            var result = HeightCoordinates.GetValue(heightIndex);

            // assert
            result.Should().Be(expected);
        }
        public void When_IndexOfIsExecuted_Then_ValidIndexIsReturned(char value, int expected)
        {
            // act
            var result = HeightCoordinates.IndexOf(value);

            // assert
            result.Should().Be(expected);
        }
Пример #3
0
        private void AddHeightHeader(StringBuilder battleship, int heightIndex)
        {
            var heightCoordinate = HeightCoordinates.GetValue(heightIndex);

            battleship.Append(heightCoordinate);
        }