Compare commits

...

2 commits

View file

@ -15,6 +15,7 @@ import org.insa.graphs.model.io.BinaryGraphReader;
import org.insa.graphs.model.io.BinaryPathReader;
import org.insa.graphs.model.io.GraphReader;
import org.insa.graphs.model.io.PathReader;
import org.junit.BeforeClass;
import org.junit.Test;
public class DijkstraAlgorithmTest {
@ -26,7 +27,7 @@ public class DijkstraAlgorithmTest {
public Path path;
//@Before
@BeforeClass
public void init() {
// Visit these directory to see the list of available files on Commetud.
// When running with VSC, paths are relative to the BE_Graphes directory.
@ -40,9 +41,13 @@ public class DijkstraAlgorithmTest {
// Read the graph. X
this.graph = reader.read();
// free resources
reader.close();
// Create a PathReader.
final PathReader pathReader = new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathName))));
// free resources
pathReader.close();
// Read the path.
this.path = pathReader.readPath(graph);