Conversation
| @@ -0,0 +1,118 @@ | |||
| package org.ogo.test.createdatastructure.createbinarytree; | |||
There was a problem hiding this comment.
we do not need a separate file for this; just keep in the same file
| @BeforeAll | ||
| public static void initQueryEngine() | ||
| throws RemoteException, InterruptedException, IOException, NotBoundException { | ||
| Thread.sleep(4000); |
There was a problem hiding this comment.
The sleep command gives time for Neo4JGraphQueryEngine to start before test runs. It also exists in all other test files.
| int[] arr = new int[] {1, 2, 3, 4, 5, 6, 7}; | ||
| BinaryTree tree = new BinaryTree(); | ||
| Node root = tree.createTree(arr, 0, arr.length); | ||
| String nodeClass = "`org.ogo.test.createdatastructure.createbinarytree.Node`"; |
There was a problem hiding this comment.
Will change hardcode class name to use reflection.
| queryBool( | ||
| root, | ||
| "MATCH (a:" | ||
| + nodeClass |
There was a problem hiding this comment.
do we need + in other tests/files or do we use String.format?
There was a problem hiding this comment.
Will change to String.format
| import org.junit.jupiter.api.Test; | ||
| import org.ogo.client.OGO; | ||
|
|
||
| public class NewBinaryTreeTest { |
There was a problem hiding this comment.
Can we please do a different Data Structure
There was a problem hiding this comment.
The other BinaryTreeTest file is disabled so I add some new tests to see if OGO works for Binary tree data structure.
Test cases created for binary tree properties