Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .plus and .times to Expression interface #16

Merged
merged 6 commits into from
Sep 30, 2022

Commits on Sep 30, 2022

  1. introduce test for Sum.plus

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus 👈🏼
    - Expression.times
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    2a73727 View commit details
    Browse the repository at this point in the history
  2. implement Sum.plus

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus ✅
    - Expression.times
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    8b98d98 View commit details
    Browse the repository at this point in the history
  3. add test for Sum.times

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus ✅
    - Expression.times 👈🏼
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    077e479 View commit details
    Browse the repository at this point in the history
  4. implement Sum.times

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus ✅
    - Expression.times ✅
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    29285c5 View commit details
    Browse the repository at this point in the history
  5. add test to make sure Money is returned if currencies are equal

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5 👈🏼
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus ✅
    - Expression.times ✅
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    82dfb62 View commit details
    Browse the repository at this point in the history
  6. return an instance of Money when adding to equal currencies

    Task list:
    - $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
    - $5 + $5 = $10 ✅
    - Return Money from $5 + $5 ✅
    - Bank.reduce(Money) ✅
    - Reduce Money with conversion ✅
    - Reduce(Bank, String) ✅
    - Sum.plus ✅
    - Expression.times ✅
    kaiosilveira committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    f41d376 View commit details
    Browse the repository at this point in the history