Stubs 及 Mocks 簡要比較
-
Stubs
- Provides static canned state which results in state verification of the system under test.
- Mocks
- Provides a behavior verification of the results for the system under test and their indirect output as related to any other component dependencies while under test.
取自 Better UnitTesting with Microsoft Fakes