-
-
Notifications
You must be signed in to change notification settings - Fork 501
GP-50 Refactor binary search tree tests using reflection #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove old PRs, use "Force push" instead to save review story.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if Node class doesn't have constructor with parameter, we should predict this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't declare any constructor in Node class but set an element this way: Node<T> newNode = new Node<>(); newNode.element = element;
the tests won't pass. You can see an example to resolve this issue in LinkedList tests.
2-0-data-structures-and-algorithms/src/test/java/com/bobocode/bst/BinarySearchTreeTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't declare any constructor in Node class but set an element this way: Node<T> newNode = new Node<>(); newNode.element = element;
the tests won't pass. You can see an example to resolve this issue in LinkedList tests.
No description provided.