Prepare your dev environment
Setup your dev environment
- Setup DX
- Install NPM
- Run the command
npm install
- Run the npm script
scratch:create:empty
- Run the npm script
scratch:deploy
Apply TDD on thoses steps
Start with the Apex Class TDD_codingDojoExercice. Only add test when you completed a full TDD cycle.
Find the smallest and uniq factors of a given number.
Here are the tests with expected results:
- factors of null is null
- factors of 0 is 0
- factors of 1 is 1
- factors of 2 is [1,2]
- factors of 3 is [1,3]
- factors of 4 is [1,2]
- factors of 5 is [1,5]
- factors of 6 is [1,2,3]
- factors of 7 is [1,7]
- factors of 8 is [1,2]
- factors of 9 is [1,3]
- factors of 10 is [1,2,5]
- factors of 16 is [1,2]
- factors of 4620 is [1,2,3,5,7,11]