Skip to content

Instantly share code, notes, and snippets.

@xpepper
Last active March 4, 2021 11:34
Show Gist options
  • Save xpepper/22dfc9172c3d78a63486da98602f3505 to your computer and use it in GitHub Desktop.
Save xpepper/22dfc9172c3d78a63486da98602f3505 to your computer and use it in GitHub Desktop.
Calculator App Kata

Calculator App

The following is a TDD Kata, an exercise in coding, test-first and refactoring.

Before you start

  • Try not to read ahead.
  • Do one task at a time.

The kata

Step 1:

Create a simple Calculator application accessible via HTTP.

  • Choose whatever technology you prefer.
  • Choose whatever API format you prefer.
  • Try to use tdd while implementing the functionality or at least test first every functionality you add.
  • Write unit and end to end tests

Implement the following operations between two numbers:

  • Addition (e.g. 2+2=4)
  • Subtraction (e.g. 2-3=-1)
  • Multiplication (e.g. 2*2=4)
  • Division (e.g. 5/3=1 remainder 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment