Back-end Engineering
Refactoring by Leveraging Your Tests with C# & xUnit
Deep dive into the Refactor phase of TDD. Learn to spot code smells and apply refactoring techniques using real examples, while keeping tests passing to preserve functionality.
C#
.NET Core
xUnit
5 lessons
21 practices
3 hours
Badge for Computer Science Fundamentals,
Computer Science Fundamentals
Course details
Eliminating Duplicated Code: Extract Functions and Refactor Magic Numbers
Refactor Duplicated Code in the Tests
Refactor Tests using Parameterization
Extract Function: calculateItemCost
Refactor duplication between calculate functions
Refactor Magic Numbers to Constants
Meet Cosmo:
The smartest AI guide in the universe
Our built-in AI guide and tutor, Cosmo, prompts you with challenges that are built just for you and unblocks you when you get stuck.
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal