Test Driven Development (TDD)
- Write test
- Run test -> test fails
- Write code to make the test pass
- Run test -> test passes
- Refactor the code
- Run test -> test should still pass!
- (Rinse, Repeat)
Instructions for continuing work on in-class demo:
-
Add tests for checking type of parameters passed into initialize. "currency_one" and "currency_two" should be strings. And "conversion_rate" should a number.
-
Add tests for checking type of paramter "amount" for both conversion methods. It should be a number.
-
The if-else in the convert_currency_two_to_one method needs to be tested. The if else gives you two different sceanrios that can happen and they both need to be tested.