Karumi Dojo • We are here to practice and learn. • This is a bullshit free environment. • This exercise meant to be collaborative, not competitive. • Try to open your mind to new concepts.
Karumi Dojo • We are here to practice Test-Driven Development. • TDD is a software development process, not a dogma. • We are going to practice pair programming. • Keep always in mind the TDD Cycle.
Rules: • Write enough test code so that to get a single test failure. • Write enough production code to get all your tests to pass. • Refactor until the code is Simple/Clean.
Business Rule 1 The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0) for example “” or “1” or “1,2”.
Business Rule 4 Calling Add with a negative number will throw an exception “negatives not allowed” - and the negative that was passed. If there are multiple negatives, show all of them in the exception message
Tips • Baby steps. • Don’t lose the green. • Choose the language you prefer. • Refactor your code. • Build errors are not failing tests. • Follow the TDD Cycle.
Extra Rule 2 To change a delimiter, the beginning of the string will contain a separate line that looks like this: “// [delimiter]\n[numbers…]” for example “//;\n1;2” should return three where the default delimiter is ‘;’ . The first line is optional. all existing scenarios should still be supported