douglytle / group31-minisurveymonkey

0 stars 0 forks source link

Implemented persistence for survey classes #12

Closed douglytle closed 2 weeks ago

douglytle commented 2 weeks ago

Spring JPA repositories have been created for surveys and the three question types. All of the survey classes have been modified to support persistence, corresponding to issue #3. Unit tests have been created, but are commented out currently because I can't figure out how to initialize the repositories right now and would like this to be available for others to build on ASAP.

Sgt-Roukoz commented 2 weeks ago

You should add a getId function to all of them to help with your tests. And also add the @DataJpaTest tag at the top of your PersistenceTest so it can work. Make sure to also autowire the repositories in the test (with @Autowired).

This should get your tests to work!

douglytle commented 2 weeks ago

Thanks for the suggestions! I have made the changes and the tests now pass. Please review my changes again and let me know if it looks alright.

Sgt-Roukoz commented 2 weeks ago

Changes and tests look good, will merge