Closed lenad90 closed 1 year ago
"ViewMyListingCommand.java
Refactored the code have new methods that identify the functions within the event code. This is will help with testing since mock variables can be made to test these functions? (Correct me if I'm wrong)"
I don't think we can test anything in your ViewMyListingCommand.java. It all relies on discord, and we are supposed to "assume" discord will do what we expect. All methods take discord variables as parameters.
Your controller code is now testable, however. You can do that with the InMemory repository.
Documents changed: Model: Listing.java and ListingFields.java
Controller: ListingController.java
ViewMyListingCommand.java
Note: **I decided to push without executing the bot first because createMyListing.java needs to be refactored as well