The following sections demonstrate some examples of using the MFUPP preprocessor to put some source code under test:
- Using MFUPP to Insert Test Code Into a Program creates a self contained test by compiling source code with the MFUPP preprocessor and then inserting copybooks containing
your test cases and accompanying test data when run through the testing framework.
- Using MFUPP to Mock and Stub a Program compiles two programs with the MFUPP preprocessor, and then uses a controller entry point in the test case to control the
flow of execution through the source. It skips certain sections of code, and also redirects to other stub code at certain
points.
- Using MFUPP to Mock a CICS Program uses a source program that uses EXEC CICS statements to receive and manipulate a text string. The test case makes assertions
based on the value of the string, but as the MFUPP preprocessor is set to ignore all EXEC CICS statements, mocking code is
required to supply the text string.