boolean-uk / software-developer

0 stars 0 forks source link

Add TDD to OOD Encapsulaiton #117

Open glowkeeper opened 2 years ago

glowkeeper commented 2 years ago

I asked Cohort 6 to solve exercise 4 of https://github.com/boolean-uk/ood-encapsulation (secretDiary) using TDD (since we've been doing TDD for the past 10 days). Would be good to add that approach to that repo (and any other repos where it makes sense)...

FYI, since that repo is not set up for node (and jasmine), I gave them instructions on zoom and listed them out in the classroom voice channel:

 1. fork https://github.com/boolean-uk/ood-encapsulation
2. clone 
3. change directory to the cloned repo
4. npm init and accept the defaults
5. npm install --save-dev jasmine
6. npx jasmine init
7. add a src directory for your source code
8. add a source file for any domains you discover
9. add methods to your domain
10. add a spec file for your tests
11. add the tests (red)
13. add logic to your methods (green)
14. refactor...maybe there are more classes/methods to extract?
 (edited)