File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/java/uk/gov/hmcts/darts/util Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -306,4 +306,24 @@ void isWithinBounds_shouldReturnFalse_WhenValueIsBelowMin() {
306306 assertThat (DataUtil .isWithinBounds (0L , 1L , 10L )).isFalse ();
307307 }
308308
309+ @ Test
310+ void isWithinBounds_shouldReturnFalse_WhenValueIsAboveMax () {
311+ assertThat (DataUtil .isWithinBounds (11L , 1L , 10L )).isFalse ();
312+ }
313+
314+ @ Test
315+ void isWithinBounds_shouldReturnTrue_WhenValueIsEqualToMin () {
316+ assertThat (DataUtil .isWithinBounds (1L , 1L , 10L )).isTrue ();
317+ }
318+
319+ @ Test
320+ void isWithinBounds_shouldReturnTrue_WhenValueIsEqualToMax () {
321+ assertThat (DataUtil .isWithinBounds (10L , 1L , 10L )).isTrue ();
322+ }
323+
324+ @ Test
325+ void isWithinBounds_shouldReturnFalseWhenValueIsNull () {
326+ assertThat (DataUtil .isWithinBounds (null , 1L , 10L )).isFalse ();
327+ }
328+
309329}
You can’t perform that action at this time.
0 commit comments