-
-
Notifications
You must be signed in to change notification settings - Fork 710
Renamed classes and added @Before method to test class #891
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.
This looks great @delbertlegg! :)
I've left a couple of comments, but they're both relatively minor things.
Thanks for taking the time to do this! :)
|
||
public class BSTTest { | ||
public class BinarySearchTreeTest { | ||
BinarySearchTree<Integer> bst; |
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.
Just as a heads up, this will probably be changed as part of issue #230 so that not all the binary search trees used in the tests will be of type Integer
. In which case we won't be able to save it as a private variable anymore :( So it's fine to leave it as a private variable for now, the way the tests are structured at the moment it's a really good change :) But just be aware that it might be changed back in the near future :)
Also also, if you do decide to keep it then it should be made private
:)
|
||
@Before | ||
public void setUp() { | ||
bst = new BinarySearchTree<>(); |
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.
I would probably rename this as well to binarySearchTree
because I find that clearer. That's just my preference though, feel free to leave it as it is if you prefer it that way :)
@FridaTveit I can make those changes, no problem. It looks like part of #376 was changed when #230 was made? It sounded like the intent was to instantiate the BinarySearchTree once for the tests, but now it looks like we can't since it may change types for each test? |
True, I didn't see that part of #376, sorry! I think it's fine to do what you've done and instantiate it in a |
@FridaTveit Makes sense, and no worries! I just want to make sure I understand the problem. I'll change the variable name and make it private for now. And I won't be annoyed about any changes, here to help :). |
changed variable name and made it private
7136df5
to
56cb043
Compare
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.
This looks great, a really good improvement! :) Thanks for taking the time to do this @delbertlegg! :)
Fixes #376
Reviewer Resources:
Track Policies