Back-end Engineering
Refactoring by Leveraging Your Tests with Swift and XCTest
This course focuses on the Refactor step in TDD, teaching developers to spot code smells and resolve them through refactoring. Using real-world examples, you'll identify common issues, apply refactoring techniques, and ensure functionality is preserved with existing tests.
Swift
XCTest
5 lessons
20 practices
3 hours
Computer Science Fundamentals
Lessons and practices
Refactoring Test Setup in ShoppingCartTests
Refactoring Duplicated Test Cases in ShoppingCart Test Suite
Refactoring Duplicated Logic in ShoppingCart Class
Refactoring Magic Numbers in ShoppingCart Class
Refactor User Registration Service by Extracting Validation Logic
Refactor User Registration Service by Extracting Address Validation Logic
Refactor User Registration Service by Extracting Data Normalization Logic
Refactor User Registration Service to Use RandomIDGenerator and Update DataStore Interface
Refactor ProcessExamScore with ScoreWeights Parameter Object
Refactor ProcessExamScore with CoursePolicy Parameter Object
Refactor ProcessExamScore Function by Reordering Parameters for Clarity
Refactor ProcessExamScore Function to Include Default Parameter Values
Refactoring Feature Envy in GradeAnalyzer with Swift
Refactoring Feature Envy in GradeAnalyzer with Swift
Refactoring Feature Envy by Moving getFailedAssignments to Student Class
Refactoring Feature Envy by Introducing StudentGradeCollection in Swift
Refactoring Shopping Cart with Extract Class Technique in Swift
Refactoring ShoppingCart with PriceCalculator Class in Swift
Refactoring ShoppingCart with DiscountCalculator Class in Swift
Implementing Tests for DiscountCalculator and PriceCalculator in Swift
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.

Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal