© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
J. E. McDonoughAutomated Unit Testing with ABAPhttps://doi.org/10.1007/978-1-4842-6951-0_9

9. Service Locator

James E. McDonough1  
(1)
Pennington, NJ, USA
 

Previous chapters explored how to encapsulate indirect input and output into classes providing those services and elaborated on the usefulness of test doubles capable of simulating those services during a unit test. This chapter introduces the service locator as a way to manage those services.

Purpose of a Service Locator

A service locator is a design feature implemented into a program for the purpose of providing a central registry for the various entities providing services to the program. It can be thought ...

Get Automated Unit Testing with ABAP: A Practical Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.