Code working but assessment not passing

My gradle build was successful and I am even getting the desired output but assessment is not passing the error is in unit testing which is showing build failed.
Any help?

Yes, that occurs normally. It’s because they are running more unit tests apart from those provided to us. You could try thinking about cases like,

  1. Can this method I used return nothing? If so, how should I handle it?
  2. Check on edge cases for arguments to methods - should/does the method behave differently?

Check for some edge cases you might be missing in your code.

The problem was with some code which I had hardcoded now it works perfectly fine.Thanks for the help.

1 Like