From the course: Agile Software Development: Refactoring
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Refactoring: Rename Variable
From the course: Agile Software Development: Refactoring
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
What is refactoring?53s
-
(Locked)
Test-driven development (TDD)1m 10s
-
(Locked)
Code kata1m 24s
-
(Locked)
Setting up the new code kata2m 30s
-
(Locked)
Setting up the TDD environment3m 13s
-
(Locked)
Refactoring: Rename Variable3m 47s
-
(Locked)
Micro-refactoring3m 47s
-
Refactoring: Inline Code4m 3s
-
(Locked)
Code kata: Continue solving the problem4m 2s
-
(Locked)
Refactoring: Extract Method4m 38s
-
(Locked)
-
-
-