CSC207-2022F-UofT / course-project-collegecook

course-project-collegecook created by GitHub Classroom
2 stars 1 forks source link

2 feature 2 search for recipe Tests all pass :) #111

Closed Hclover2003 closed 1 year ago

Hclover2003 commented 1 year ago

All SearchInteractor tests pass now

  1. Fixed NullPointerException errors (old - before review branch merge). It was because reviews.sav and recipe.sav was Null, and Recipe and Review gateways had not handled this case yet.
  2. Fixed NullPointerException error (new - after review branch merge). These were because with the updated RecipeInteractor, an instance of it now required a presenter. Instead, used static method. Also, when the static method loadReviewDatabase was called from the class, it did not have an instantiated reviewDatabaseReadWriter. By instantiating it, the method then worked.
  3. Create reviews with ReviewDatabaseReadWriter instead of ReviewInteractor (to avoid passing in ReviewPresenter)
  4. Cleaned up test code: moved all code for creating recipes and users to the setup method.