I have gone through the forum and added constraints for the following possibilities:
-
args[1] is not provided: For this, I chose the endDate to be of today’s date
-
startDate or endDate are not provided in the response array: I have chosen values the nearest to both the dates i.e, For startDate I have chosen arrayIndexValue of 0 and for endDate I have chosen arrayIndexValue of (array.length - 1).
-
Handled all the NullPointer, ArrayOutOfBound, RunTimeExceptions
-
Returning empty list after exception
-
Sorted the data properly
-
Ensured that there are no hardcoded values in the data
But still, after taking so many precautions. One test case mainCalculateReturnsInvalidStocks() is failing.
I have been stuck on this issue for 3 days. Tried everything. Please help me out.
I really want to enroll myself in Crio-Code Byte for this I need to finish the deadline.
@anand-crio @ajay-crio @sridherj-criodo @som @theIceman