AY1920S2-CS2103T-W17-2 / main

Notably
https://ay1920s2-cs2103t-w17-2.github.io/main/
MIT License
3 stars 4 forks source link

Update TypicalBlockModel to enable standardised BlockModel-related testing #389

Closed kevinputera closed 4 years ago

kevinputera commented 4 years ago

Currently, there are several test classes that independently create their own BlockModel instance from scratch. To name a few, we have AbsolutePathCorrectionEngineTest, all the ...SuggestionCommandParserTest classes, etc.

To reduce code duplication in our test cases, we can create a factory method for a dummy BlockModel instance. Then, all these test cases that currently create their own BlockModel instance independently can use this factory method to initialize their BlockModels. Currently, com.notably.testutil.TypicalBlockModel can be tweaked to achieve that purpose.

What needs to be changed in com.notably.testutil.TypicalBlockModel for this to happen: