forked from neo4j/neo4j
-
Notifications
You must be signed in to change notification settings - Fork 1
week3
William Lyon edited this page Jun 6, 2014
·
5 revisions
- Resolve DistanceTest failure
- Discuss plan for projections / handling spherical distance calculations
- Begin porting core Spatial functionality into Neo4j
- Resolved failing DistanceTest issue and added additional unit tests
- This was fixed by figured out how to properly mock objects using Mockito, in this case mocking the getProperty() function on Node objects. For example this function returns a mocked Node that mock the getProperty() function for properties x and y:
private def mockedNodeWithXY(id: Long, x: Double, y: Double): Node = { val node = mock[Node] Mockito.when(node.getProperty("x").asInstanceOf[Double]).thenReturn(x) Mockito.when(node.getProperty("y").asInstanceOf[Double]).thenReturn(y) node }
- Refactored Distance function for better code reuse and more explicit use of pattern matching
- Finalized remaining GSoC weekly schedule with goals
- Discussion and plan for porting core Spatial functionality into Neo4j for Spatial Cypher access
- Continue Coursera Scala course