refactoring-code_smells-design_patterns
refactoring-code_smells-design_patterns copied to clipboard
Code Smells in BookingShould Duplicate Code
Problem: Each test method repeats the same object instantiation for the Booking class. This makes it harder to maintain and increases the chances of errors when updating the test data.
Fix: Extract the Booking creation logic into a separate private method. Allow passing custom dates to make tests more readable.