public void TestGetTextureGroupForPoint() { var textureGroupResolver = new HeightmapTextureGroupResolver(_mockHeightmap, _mockTextureGroupRepository); var upperLeftTextureGroup = new TextureGroupRange(0, 50); var upperRightTextureGroup = new TextureGroupRange(51, 150); var lowerLeftTextureGroup = new TextureGroupRange(151, 200); var lowerRightTextureGroup = new TextureGroupRange(201, 255); _mockTextureGroupRepository.Add(upperLeftTextureGroup); _mockTextureGroupRepository.Add(upperRightTextureGroup); _mockTextureGroupRepository.Add(lowerLeftTextureGroup); _mockTextureGroupRepository.Add(lowerRightTextureGroup); var textureGroup = textureGroupResolver.GetTextureGroupForPoint(0, 0); Assert.AreSame(upperLeftTextureGroup, textureGroup); textureGroup = textureGroupResolver.GetTextureGroupForPoint(5, 0); Assert.AreSame(upperRightTextureGroup, textureGroup); textureGroup = textureGroupResolver.GetTextureGroupForPoint(0, 5); Assert.AreSame(lowerLeftTextureGroup, textureGroup); textureGroup = textureGroupResolver.GetTextureGroupForPoint(5, 5); Assert.AreSame(lowerRightTextureGroup, textureGroup); }