Code Refactoring

Learn how refactoring code can improve understanding.

We'll cover the following

Clean Up Tests

After the second pass through the TDD cycle, we have code we can clean up in the tests. We want our tests to stay short and clear. Both our tests instantiate Profile. Create a Profile field and move the common initialization to an @Before method:

Get hands-on with 1400+ tech skills courses.