Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Using Seams to Enable Testability and Expand Capabilities

via CodeSignal

Overview

Seams are strategic points in code where behavior can be modified without altering the existing implementation. They are crucial for introducing changes safely, enabling testing, and refactoring legacy systems incrementally. This course explores functional, object, and preprocessor seams, and their role in improving code maintainability.

Syllabus

  • Unit 1: Functional Seams with Functions as Parameters
    • Refactoring Order Processing Logic
    • Custom Order Calculation Made Simple
    • Custom Discount Test Implementation
    • Custom Order Pricing Test Implementation
  • Unit 2: Functional Seams with Feature Flags
    • Creating Order Calculation Modes
    • Switch Expression for Order Calculations
    • Optional Parameters for Order Processing
    • Testing Order Processing Normal Mode
    • Testing Order Discount Calculations
    • Testing Order Surcharge Calculation
  • Unit 3: Object Seams Using Inheritance
    • Making Methods Ready for Inheritance
    • Inherit and Override for Discounts
    • Testing Discount Order Processing
    • Testing Discount Order Processing Logic
  • Unit 4: Object Seams using Interface Breakdown
    • Interface Segregation for Notification System
    • Interface Segregation in Action
    • Adding Two New Interfaces
    • Interface Segregation in Notification System

Reviews

Start your review of Using Seams to Enable Testability and Expand Capabilities

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.