Closed RezwanAhmed123 closed 1 week ago
All modified and coverable lines are covered by tests :white_check_mark:
Files with missing lines | Coverage Δ | Complexity Δ | |
---|---|---|---|
...edu/address/logic/commands/DeleteClaimCommand.java | 75.00% <100.00%> (+75.00%) |
3.00 <0.00> (+3.00) |
Some weird behaviours only found during the testing phase.
The persisting issue is that the models point to the same insurance plan manager object when manipulating one of the models. In the actual application this is not an issue as only one model can exist at a time. However, in the testing environment, there are two models existing at once.
This creates weird behaviours when comparing the insurance plan managers between 2 models as deleting a claim in one model also deletes it in the second model, throwing errors in the test.
Let's fix this by creating a new object using the JSON string methods in the insurance plan manager class.
This will create 2 separate objects preventing the manipulation in one of the models to affect the second, allowing the tests to pass.