cancel
Showing results for 
Search instead for 
Did you mean: 

Neo4j with ShortestPath by using many cities with its routes

sngermiyanoglu
Node Clone

Hi,

I have no idea as I cannot run all test methods defined below what if there are many cities and their routes.

As you can see in the class, there are only 2 cities and one route between them.

What about many cities with their routes defined in the test?

How can I revise my test class ?

Here is the link : Test Class 

3 REPLIES 3

glilienfield
Ninja
Ninja

Not sure I understand your question. If you are trying to enhance your test for scenarios that have many more cities and routes, then you can just add more paths that have cities and routes, but make them longer than the one you have, so the one you have will be the shortestPath returned. If this is what you mean, then you just need to add more paths in your setup cypher to ensure the result is returning the shortestPath, regardless of the other 'longer' paths. 

I updated my repository again.

Here are my latest issues shown below.

1 ) I get empty destinationCity as null value when I try to add a route. I tried to use Mapper to handle with it but nothing changed.

java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.City.getName()" because the return value of "com.springshortpath.app.model.Route.getDestinationCity()" is null

2 ) I cannot run all test methods in AppApplicationTests.java

Here is the link : Link

3 ) When I work with docker, I cannot calculate shortest path in terms of duration. Here is my issue shown below.

org.neo4j.driver.exceptions.ClientException: There is no procedure with the name `apoc.algo.dijkstra` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.

4 ) I have no idea as I cannot run all test methods what if there are many cities and its route like this resource (Link)

I have only two cities with its route which is between term. How can I defined many cities with their routes like this resource ?Resource Link screenshot_29.PNGedium.com/one-month-graph-challenge-hero-city-cc4ffa51bb1b