Testing code that depends on information from external sources is one of the more challenging problems a software engineer will face. How do you go about automating tests when the data returned by a service dependency may change from moment to moment? How do you deal with network/database issues that arise during automated testing? If you need to test the behavior of your code under error conditions, how do you mimic that environment?
External dependencies can be handled by designing the application in such a way that the dependencies can be replaced by "mock" objects during testing. These mock objects respond to the requests the application makes in reliable ways and can be used to test both standard and error conditions.
This lab will teach the process of creating and providing mock objects when testing code that depends on external sources of information. This will be accomplished by guiding the user through the implementation of a fictitious point of sale application.