Why these are failing?

Task :qmoney:test

com.crio.warmup.stock.PortfolioManagerApplicationTest > testCalculateAnnualizedReturnGoogl() FAILED
org.opentest4j.AssertionFailedError at PortfolioManagerApplicationTest.java:78

com.crio.warmup.stock.PortfolioManagerApplicationTest > mainCalculateAnnualReturn() FAILED
org.opentest4j.AssertionFailedError at PortfolioManagerApplicationTest.java:56

@rathina @Rahul-Crio.do

The Calculated value and the expected value are not same. That’s why it is showing assertion error. Make sure the values calculated are exact. Use debugger to know what value is calculated by your code.

Check if you have written the formula for years correct !

1 Like

Thanks very much it was such a silly mistake i have done.

Delete your code from here otherwise @Crio-Team will send you nice little red envelope as a warning. :love_letter:

@jayansh Posting code / code screenshots onto forum is against the community guidelines. Repeating this will lead to some hard reactions from ourside.