Computer Programming
Using Sprout and Wrap Techniques
Sprout and wrap techniques help safely add or modify functionality in existing code by introducing new methods, classes, or wrappers. These approaches minimize risk, preserve legacy behavior, and improve testability. This course covers both techniques for refactoring and expanding Scala code.
Scala
ScalaTest
See path
6 lessons
27 practices
4 hours
Badge for Software Development Practices,
Software Development Practices
Lessons and practices
Sprouting a New Order Processing Method
Testing Order Processing with Surcharges
Testing Empty Orders with Surcharges
Testing Negative Surcharges with Parametrized Tests
Testing Order Processing with Surcharges
Extract Customer Lookup Method
Extract Order Calculation Logic
Extract Payment Logic for Better Code
Extract Order Status Update Method
Extract Email Confirmation Method
Extract Method Refactoring Pattern
Adding Fraud Detection to OrderProcessor
Using the New Dependency to Prevent Fraud
Testing Fraud Detection with Mocks
Testing Order Processing Without Fraud
Creating a Metrics Collector Class
Order Metrics Collection System
Adding Metrics Collector Dependency
Metrics Collection Refactoring
Enhancing Order System with Customer Features
Loyalty Rewards for Valued Customers
Building a Discount Order Processor
Discount Processing for Loyal Customers
Create a Trait for Order Processing
Creating the new Order Processor that Logs Events
Adding Logs to Order Processing
Complete the Order Cancellation Logger
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