private void SetupTextureGroupRepositoryMock()
        {
            var mock = new Mock <ITextureGroupRepository <TextureGroupRange> >();

            var textureGroupRanges = new List <TextureGroupRange>();

            mock.Setup(textureGroupRepository => textureGroupRepository.Add(It.IsAny <TextureGroupRange>()))
            .Callback((TextureGroupRange textureGroup) => textureGroupRanges.Add(textureGroup));

            mock.SetupGet(textureGroupRepository => textureGroupRepository.Items).Returns(textureGroupRanges);

            _mockTextureGroupRepository = mock.Object;
        }
        public HeightmapTextureGroupResolver(IHeightmap heightmap, ITextureGroupRepository <TextureGroupRange> textureGroupRepository)
        {
            if (heightmap == null)
            {
                throw new ArgumentNullException("heightmap");
            }

            if (textureGroupRepository == null)
            {
                throw new ArgumentNullException("textureGroupRepository");
            }

            _heightmap = heightmap;
            _textureGroupRepository = textureGroupRepository;
        }
        public HeightmapTextureGroupResolver(IHeightmap heightmap, ITextureGroupRepository<TextureGroupRange> textureGroupRepository)
        {
            if(heightmap == null)
            {
                throw new ArgumentNullException("heightmap");
            }

            if(textureGroupRepository == null)
            {
                throw new ArgumentNullException("textureGroupRepository");
            }

            _heightmap = heightmap;
            _textureGroupRepository = textureGroupRepository;
        }
        public HeightmapPageTextureGroupResolver(IHeightmapPage heightmapPagePage, ITextureGroupRepository<TextureGroupRange> textureGroupRepository)
        {
            if(heightmapPagePage == null)
            {
                throw new ArgumentNullException("heightmapPagePage");
            }

            if(textureGroupRepository == null)
            {
                throw new ArgumentNullException("textureGroupRepository");
            }

            _heightmapPage = heightmapPagePage;
            _textureGroupRepository = textureGroupRepository;
            _textureGroupRangeIndex = new Lazy<IList<TextureGroupRange>>(InitializeTextureGroupRangeIndex);
        }
        private void SetupTextureGroupRepositoryMock()
        {
            var mock = new Mock<ITextureGroupRepository<TextureGroupRange>>();

            var textureGroupRanges = new List<TextureGroupRange>();

            mock.Setup(textureGroupRepository => textureGroupRepository.Add(It.IsAny<TextureGroupRange>()))
                .Callback((TextureGroupRange textureGroup) => textureGroupRanges.Add(textureGroup));

            mock.SetupGet(textureGroupRepository => textureGroupRepository.Items).Returns(textureGroupRanges);

            _mockTextureGroupRepository = mock.Object;
        }