CS5500-S-2023 / team-bear

team-bear created by GitHub Classroom
0 stars 0 forks source link

refractor fields and listing model #57

Closed lenad90 closed 1 year ago

lenad90 commented 1 year ago

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

tsanevp commented 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.