From the course: Agile Software Development: Refactoring

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Code kata: Continue solving the problem

Code kata: Continue solving the problem

From the course: Agile Software Development: Refactoring

Start my 1-month free trial

Code kata: Continue solving the problem

- [Presenter] I've gone ahead and added additional tests and solution code for all of the single digit Roman Numeral cases. You can complete that part of the Kata yourself or you can look at the solution code that I've provided. Now lets move on to the next test case, Roman Numeral addition. In Roman Numerals, addition looks like this. To write one plus one, you put I and I next to each other. II is the same thing as one plus one, and in our code and our solution we'll be looking for that to return the value of two. III would be the same as one plus one plus one, and our code should return the value, three. VI would be the same as five plus one and our code should return the value, six, and so on. So let's write our first test case for this at like 23 and a half, type @Test public void and we'll give this test a name like, romanNumeralAddition. And our first assertion will be AssertEquals two with the input of Roman.convert II. We'll run our tests, and we'll notice that our test…

Contents