citerus / dddsample-core

This is the new home of the original DDD Sample app (previously hosted at sf.net)..
MIT License
4.94k stars 1.47k forks source link

Refactor GraphTraversalService Implementation #94

Closed yashTEF closed 1 year ago

yashTEF commented 1 year ago

The existing findShortestPath() implementation for GraphTraversalService is cumbersome and hard to read, hence it can be refactored and implemented in a shorter and more efficient manner.

orende commented 1 year ago

@yashTEF The code changes look good to me, but for the sake of verifying that no regressions have been introduced, would you mind adding a unit test for the GraphTraversalService class?

yashTEF commented 1 year ago

@orende , there already seems to be a unit test present which tests the correctness of possible routes obtained from findShortestPath in the ExternalRoutingServiceTest class under the testCalculatePossibleRoutes() method.

Is this what you are referring to?

yashTEF commented 1 year ago

@orende , there already seems to be a unit test present which tests the correctness of possible routes obtained from findShortestPath in the ExternalRoutingServiceTest class under the testCalculatePossibleRoutes() method.

Is this what you are referring to?

@orende Any update, Is the above mentioned unit test sufficient or some other unit test needs to be added?

orende commented 1 year ago

@yashTEF Sorry about the late response. I looked at ExternalRoutingServiceTest and you're right in that it covers the functionality.