Patching capabilities of gomonkey
mastergomonkey provides extensive support for monkey patching in unit tests, including:
- Targets: Functions, public member methods, private member methods, interfaces, function variables, and global variables.
- Sequencing: You can specify a sequence of different patches for functions, member methods, interfaces, and function variables (allowing the patched function to return different values on consecutive calls).