@@ -13,33 +13,33 @@ public class BinarySearchTreeTest {
1313 public void dataIsRetained () {
1414 BinarySearchTree <Integer > binarySearchTree = new BinarySearchTree <>();
1515
16- final int expected = 4 ;
16+ int expected = 4 ;
1717 binarySearchTree .insert (expected );
1818
19- final BinarySearchTree .Node <Integer > root = binarySearchTree .getRoot ();
19+ BinarySearchTree .Node <Integer > root = binarySearchTree .getRoot ();
2020 assertNotNull (root );
2121
22- final int actual = root .getData ();
22+ int actual = root .getData ();
2323 assertEquals (expected , actual );
2424 }
2525
2626 @ Ignore ("Remove to run test" )
2727 @ Test
2828 public void insertsLess () {
2929 BinarySearchTree <Character > binarySearchTree = new BinarySearchTree <>();
30- final char expectedRoot = '4' ;
31- final char expectedLeft = '2' ;
30+ char expectedRoot = '4' ;
31+ char expectedLeft = '2' ;
3232
3333 binarySearchTree .insert (expectedRoot );
3434 binarySearchTree .insert (expectedLeft );
3535
36- final BinarySearchTree .Node <Character > root = binarySearchTree .getRoot ();
36+ BinarySearchTree .Node <Character > root = binarySearchTree .getRoot ();
3737 assertNotNull (root );
38- final BinarySearchTree .Node <Character > left = root .getLeft ();
38+ BinarySearchTree .Node <Character > left = root .getLeft ();
3939 assertNotNull (left );
4040
41- final char actualRoot = root .getData ();
42- final char actualLeft = left .getData ();
41+ char actualRoot = root .getData ();
42+ char actualLeft = left .getData ();
4343 assertEquals (expectedLeft , actualLeft );
4444 assertEquals (expectedRoot , actualRoot );
4545 }
@@ -48,19 +48,19 @@ public void insertsLess() {
4848 @ Test
4949 public void insertsSame () {
5050 BinarySearchTree <String > binarySearchTree = new BinarySearchTree <>();
51- final String expectedRoot = "4" ;
52- final String expectedLeft = "4" ;
51+ String expectedRoot = "4" ;
52+ String expectedLeft = "4" ;
5353
5454 binarySearchTree .insert (expectedRoot );
5555 binarySearchTree .insert (expectedLeft );
5656
57- final BinarySearchTree .Node <String > root = binarySearchTree .getRoot ();
57+ BinarySearchTree .Node <String > root = binarySearchTree .getRoot ();
5858 assertNotNull (root );
59- final BinarySearchTree .Node <String > left = root .getLeft ();
59+ BinarySearchTree .Node <String > left = root .getLeft ();
6060 assertNotNull (left );
6161
62- final String actualRoot = root .getData ();
63- final String actualLeft = left .getData ();
62+ String actualRoot = root .getData ();
63+ String actualLeft = left .getData ();
6464 assertEquals (expectedLeft , actualLeft );
6565 assertEquals (expectedRoot , actualRoot );
6666 }
@@ -69,19 +69,19 @@ public void insertsSame() {
6969 @ Test
7070 public void insertsRight () {
7171 BinarySearchTree <Integer > binarySearchTree = new BinarySearchTree <>();
72- final int expectedRoot = 4 ;
73- final int expectedRight = 5 ;
72+ int expectedRoot = 4 ;
73+ int expectedRight = 5 ;
7474
7575 binarySearchTree .insert (expectedRoot );
7676 binarySearchTree .insert (expectedRight );
7777
78- final BinarySearchTree .Node <Integer > root = binarySearchTree .getRoot ();
78+ BinarySearchTree .Node <Integer > root = binarySearchTree .getRoot ();
7979 assertNotNull (root );
80- final BinarySearchTree .Node <Integer > right = root .getRight ();
80+ BinarySearchTree .Node <Integer > right = root .getRight ();
8181 assertNotNull (right );
8282
83- final int actualRoot = root .getData ();
84- final int actualRight = right .getData ();
83+ int actualRoot = root .getData ();
84+ int actualRight = right .getData ();
8585 assertEquals (expectedRight , actualRight );
8686 assertEquals (expectedRoot , actualRoot );
8787 }
@@ -131,7 +131,7 @@ public void sortsCollectionOfTwoIfSecondInsertedIsSmallerThanFirst() {
131131 List <Integer > actual = binarySearchTree .getAsSortedList ();
132132 assertEquals (expected , actual );
133133 }
134-
134+
135135 @ Ignore ("Remove to run test" )
136136 @ Test
137137 public void sortsCollectionOfTwoIfSecondNumberisSameAsFirst () {
0 commit comments