May 2018
Intermediate to advanced
300 pages
7h 35m
English
With mocks, you are sure of a wide test coverage, as you can easily use mock objects to simulate possible exceptions, execution scenarios, and conditions that otherwise would be difficult without mocks. For example, if you have a method that purges or drops a database table, it is safer to test this method using mock objects than run it on a live database each time the unit test is run.