internal IPath[][] ConvertPathDtos(PathDto[][] pathDtos)
        {
            var paths = new IPath[pathDtos.Length][];
            var i = 0;

            foreach ( PathDto[] dtos in pathDtos )
            {
                paths [ i++ ] = dtos.Select(ConvertPathDto).ToArray();
            }

            return paths;
        }
        public void ConvertPathDto_CallsConvert_WhenCalled()
        {
            // Arrange
            var dto = new PathDto();
            RacetracksDtoToRacetracksConverter sut = CreateSut();

            // Act
            sut.ConvertPathDto(dto);

            // Assert
            m_PathDtoToPath.Received().Convert();
        }
        public void ConvertPathDtos_ReturnsEmptyArray_ForEmptyDtoArray()
        {
            // Arrange
            var dtos = new PathDto[0][];
            RacetracksDtoToRacetracksConverter sut = CreateSut();

            // Act
            IPath[][] actual = sut.ConvertPathDtos(dtos);

            // Assert
            Assert.False(actual.Any());
        }
        public void ConvertPathDto_SetsDto_WhenCalled()
        {
            // Arrange
            var dto = new PathDto();
            RacetracksDtoToRacetracksConverter sut = CreateSut();

            // Act
            sut.ConvertPathDto(dto);

            // Assert
            Assert.AreEqual(dto,
                            m_PathDtoToPath.Dto);
        }
        public void ConvertPathDto_ReturnsPath_WhenCalled()
        {
            // Arrange
            var path = Substitute.For <IPath>();
            m_PathDtoToPath.Path.Returns(path);
            var dto = new PathDto();
            RacetracksDtoToRacetracksConverter sut = CreateSut();

            // Act
            IPath actual = sut.ConvertPathDto(dto);

            // Assert
            Assert.AreEqual(path,
                            actual);
        }