@@ -81,7 +81,7 @@ public void findsAValueInAnArrayOfEvenLength() {
8181
8282 @ Ignore ("Remove to run test" )
8383 @ Test
84- public void identifiesThatAValueIsNotIncludedInTheArray () {
84+ public void identifiesThatAValueIsNotFoundInTheArray () {
8585 List <Integer > sortedList = Collections .unmodifiableList (
8686 Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
8787 );
@@ -93,7 +93,7 @@ public void identifiesThatAValueIsNotIncludedInTheArray() {
9393
9494 @ Ignore ("Remove to run test" )
9595 @ Test
96- public void aValueSmallerThanTheArraysSmallestValueIsNotIncluded () {
96+ public void aValueSmallerThanTheArraysSmallestValueIsNotFound () {
9797 List <Integer > sortedList = Collections .unmodifiableList (
9898 Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
9999 );
@@ -105,7 +105,7 @@ public void aValueSmallerThanTheArraysSmallestValueIsNotIncluded() {
105105
106106 @ Ignore ("Remove to run test" )
107107 @ Test
108- public void aValueLargerThanTheArraysSmallestValueIsNotIncluded () {
108+ public void aValueLargerThanTheArraysSmallestValueIsNotFound () {
109109 List <Integer > sortedList = Collections .unmodifiableList (
110110 Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
111111 );
@@ -117,11 +117,24 @@ public void aValueLargerThanTheArraysSmallestValueIsNotIncluded() {
117117
118118 @ Ignore ("Remove to run test" )
119119 @ Test
120- public void nothingIsIncludedInAnEmptyArray () {
120+ public void nothingIsFoundInAnEmptyArray () {
121121 List <Integer > emptyList = Collections .emptyList ();
122122
123123 BinarySearch search = new BinarySearch (emptyList );
124124
125125 assertEquals (-1 , search .indexOf (1 ));
126126 }
127+
128+ @ Ignore ("Remove to run test" )
129+ @ Test
130+ public void nothingIsFoundWhenTheLeftAndRightBoundCross () {
131+ List <Integer > sortedList = Collections .unmodifiableList (
132+ Arrays .asList (1 , 2 )
133+ );
134+
135+ BinarySearch search = new BinarySearch (sortedList );
136+
137+ assertEquals (-1 , search .indexOf (0 ));
138+ }
139+
127140}
0 commit comments