AssertionError?

java.lang.AssertionError:
Expected :20
Actual :0

Hi @prem.dhadkar,

That means your unit test failed. You will be able to know why it failed by looking at error message around this output.

Kanika

1 Like

So, shall I change the original value (20) by zero ?

Hey @prem.dhadkar

If what you mean is to change the test I would say no. Please consider that your code may not be correct before changing the test code. :slightly_smiling_face:

But it is working by changing the value

Yep. But if you change the test how can you know that your code was right?

Like if you got a question wrong on the SATs and then went and modified the question so that your answer was right.

:confused:

2 Likes

I am really sorry!.
I was not familiar with Assert class.
After reading about it I came to know everything. once again I am sorry

1 Like

@prem.dhadkar

No need to be sorry. Really happy you got it figured out!