Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests and refactored code for the Terrain package - Bas de Böck & Alexander Grooff #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderGrooff
Copy link

Authors: Bas de Böck (@BdeBock) & Alexander Grooff (@AlexanderGrooff).

Added various unit test cases and refactored code of the TerrainQuad, TerrainPatch, and UpdatedTerrainPatch classes.

* Initial structure for TerrainQuadTest

* Added test for getQuad

* Tests for all children of root for findRightQuad

* Added tests for findDown, Left and Top quad

* Added parent findQuad tests

* lod test

* lod test

* Added FakeTerrainQuad with public getQuad method

* Added method to create nested quads

* Tests for all children of root for findRightQuad

* Added tests for findDown, Left and Top quad

* Added parent findQuad tests

* lod test

* lod test

* Changed tests to cover everything except useFinder lines

* Added test for getPatch

* Added exception variable and tests for findRightPatch

* Added null checks to getPatch and findRightPatch tests

* Refactoring and Testing of createQuadPatch method in TerrainQuad.

* Fixed exception assertion in patch tests

* Added final patch tests

* First step of refactoring findQuad

* Improved readability of findQuad, added test to compare new methods to old findQuad methods

* Added functionality for neighbourfinder in all directions

* createQuadPatch is refactored to setPatchChildren

* Added Javadoc to the createQuadPatch methods.

* Added testclass for NeighbourFinder

* Add test for using NeighbourFinder in findQuad

* Refactored findDownQuad etc to findQuad(dir) in tests, and assured 100% coverage for findQuad(dir)

* Deprecated all findXQuad() methods

* Refactored to findPatch methods in TerrainPatch

* Added comparison tests between old code and refactored code

* Removed dead test code

* Added deprecated tags to old code

* Set deprecated code back to tests and the code itself

* Added test coverage for the NeighbourFinder in the legacy code

* Reversed legacy code to its original code

* Changed existing code to use the new findPatch method

* testGetHeightmapHeight

* TerrainQuadTest updated

* Created new class QuadrantFinder to reduce duplicate code

* Removed unused field `i` from QuadrantFinder class

* Removed most duplicate code between fixEdges and findNeighboursLod

* created getHeight test, to test the private method findMatchingChild (only place this is called is in getHeight method).

* fixed javadoc for tests

* Reverted refactorings merge

* Fixed auto-merge issues related to test_calculateLod

* changed name of testCalculateLod to testHasLodChanged.

* hasLodChanged javadoc.

* Added names to createNestedQuad, added first test for fixEdges

* Improved testFixEdges

* Added test for findNeighboursLod

* Added test for all setLod methods in UTP

* Added setLod with test

* Added getNeighbours to TerrainPatch and refactored fixEdges

* Refactored findNeighboursLod

* Updated JavaDoc

* Fixed createNestedQuad update

* Small bugfix
@AlexanderGrooff AlexanderGrooff changed the title Unit tests and refactored code for the Terrain package Unit tests and refactored code for the Terrain package - Bas de Böck & Alexander Grooff Apr 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant