Closed RezwanAhmed123 closed 1 week ago
Attention: Patch coverage is 90.00000%
with 1 line
in your changes missing coverage. Please review.
Files with missing lines | Patch % | Lines |
---|---|---|
.../model/client/insurance/InsurancePlansManager.java | 90.00% | 0 Missing and 1 partial :warning: |
Files with missing lines | Coverage Δ | Complexity Δ | |
---|---|---|---|
.../model/client/insurance/InsurancePlansManager.java | 86.02% <90.00%> (+0.20%) |
44.00 <3.00> (+2.00) |
merged as all nits were fixed
Fix testing methods for Insurance and Claim Commands
The testing utilities do not support comparison of states of InsurancePlansManager objects as we purposefully implemented it as a mutable object and did not include this object to the client's equals method.
This causes weird testing behaviours as the expected and intended models used in assertCommandSuccess methods do not really check if the two InsurancePlansManager objects are indeed the same.
Let's introduce a new testing utility to check for changes in InsurancePlanManager objects instead of clients.
This should make the testing alot easier and accurate for commands related to Insurances and Claims.
While using the new tests, uncovered a bug inside close claim command as the plan marks the object itself as false. This may cause weird behaviours if say, two claims with same claimIds exist under different plans.
Let's change this to ensure only the claim inside of the insurance plan.
This should get rid of any weird behaviours.
The following tests were also updated using the new test utility.