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.

Refactoring: Rename Variable

Refactoring: Rename Variable

From the course: Agile Software Development: Refactoring

Start my 1-month free trial

Refactoring: Rename Variable

- [Narrator] Now we'll begin solving the Roman numerals Kata. We'll start with the simplest test case. Single-digit Roman numerals. For example, I converts to the Arabic number one. V converts to the Arabic number five, and so on. We'll start by writing our first test of the behavior of the problem we're trying to solve. So to do this at line 11 and a half. Type @test, press enter. Public void, we'll give the test a name like converts single digit Roman. Now here test first development is going to guide us toward architecting the solution to the problem. We don't have any solution code yet. The test that we write will guide us toward the solution code. So we're looking for a method that returns an integer and our method will have a name like convert. And we'll take an input string, the input string is the Roman numeral that we're trying to convert. So we're looking for solution code that will look something like that. Convert and it takes a string as its input. And now to finish the…

Contents