extentreports-java
extentreports-java copied to clipboard
Return null when get category with size >=2
I wrote some UT then found bellow problem. When I call ExtentTest.assignCategory to add 2 category, then verify. ExtentTest.getModel().getCategory(0) return null.
I check the ExtentTest class I think problem is bellow code:
https://github.com/anshooarora/extentreports-java/blob/6b052be442a330e37c05a98714b1578a9f0bd157/src/main/java/com/aventstack/extentreports/model/Test.java#L275
The condition: index.intValue() >= this.category.size() - 1 return false in my case (index = 0 and category.size = 2) so the above line return null when getting category.
Thanks, I will have a look and update you