@@ -81,7 +81,7 @@ public void findsAValueInAnArrayOfEvenLength() {
81
81
82
82
@ Ignore ("Remove to run test" )
83
83
@ Test
84
- public void identifiesThatAValueIsNotIncludedInTheArray () {
84
+ public void identifiesThatAValueIsNotFoundInTheArray () {
85
85
List <Integer > sortedList = Collections .unmodifiableList (
86
86
Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
87
87
);
@@ -93,7 +93,7 @@ public void identifiesThatAValueIsNotIncludedInTheArray() {
93
93
94
94
@ Ignore ("Remove to run test" )
95
95
@ Test
96
- public void aValueSmallerThanTheArraysSmallestValueIsNotIncluded () {
96
+ public void aValueSmallerThanTheArraysSmallestValueIsNotFound () {
97
97
List <Integer > sortedList = Collections .unmodifiableList (
98
98
Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
99
99
);
@@ -105,7 +105,7 @@ public void aValueSmallerThanTheArraysSmallestValueIsNotIncluded() {
105
105
106
106
@ Ignore ("Remove to run test" )
107
107
@ Test
108
- public void aValueLargerThanTheArraysSmallestValueIsNotIncluded () {
108
+ public void aValueLargerThanTheArraysSmallestValueIsNotFound () {
109
109
List <Integer > sortedList = Collections .unmodifiableList (
110
110
Arrays .asList (1 , 3 , 4 , 6 , 8 , 9 , 11 )
111
111
);
@@ -117,11 +117,24 @@ public void aValueLargerThanTheArraysSmallestValueIsNotIncluded() {
117
117
118
118
@ Ignore ("Remove to run test" )
119
119
@ Test
120
- public void nothingIsIncludedInAnEmptyArray () {
120
+ public void nothingIsFoundInAnEmptyArray () {
121
121
List <Integer > emptyList = Collections .emptyList ();
122
122
123
123
BinarySearch search = new BinarySearch (emptyList );
124
124
125
125
assertEquals (-1 , search .indexOf (1 ));
126
126
}
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
+
127
140
}
0 commit comments