binary-search-tree: extract initialization and rename test class
See original GitHub issueIn the binary-search-tree
exercise, the test class is named BSTTest
and the target class name is BST
. For better or for worse, idiomatic Java avoids abbreviations. Also, each test method creates its own instance of BST
. Unfortunately, Shalloway’s Law applies.
Please:
- Rename the test suite to a more descriptive name.
- Rename the target class to a congruent name (ideally, the name of the test suite is the name of the class with a
Test
suffix). - Extract construction of the subject under test in
setUp()
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Unit testing a binarysearchtree [closed] - Stack Overflow
Some binary tree class that only works with nodes. Lets name it BinaryTree . It supports insertion and removal of Node * ,...
Read more >Binary Search Tree in R with R6 Reference Class - YouTube
Binary Search Tree in R with R6 Reference Class. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >Java Program to Rename a File - GeeksforGeeks
Changing the name of the file is known as Renaming the file. Rename operation is possible using renameTo() method belongs to the File...
Read more >Programming Assignment #5 (binary search tree iterator)
Your assignment is to complete these. New methods in class BSTWithIter. begin(). returns an iterator pointing to the first element of the BST...
Read more >Python Binary Search Tree - Code Review Stack Exchange
As an exercise to get better in Python, I decided to implement a Binary Search Tree. This implementation uses two classes: BSTNode and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
RTFM aye! 😃 Thanks for the explanation. Working on the fix now.
Yup, those are the correct files 😃 The convention for class names in java is to start with a capital letter, use camelCase and avoid abbreviations. So I would suggest BinarySearchTree.java and BinarySearchTreeTest.java 😃