From a8309fd858c653a3b67cf92074cf2abf4ef45718 Mon Sep 17 00:00:00 2001 From: Jungpyo Hong Date: Thu, 12 Aug 2021 21:15:25 -0500 Subject: [PATCH] update Test Double --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99b8b2b..e37f7fc 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Feel free to fork this repository and pull requests!! - [OperationQueue](#operationQueue) - [Thread Sanitizer](#Thread-Sanitizer) - [Testing](#Testing) - - [Various Types Of Test Method](#Various-types-of-test-method) + - [Test Double](#Test-Double) - [TDD](#TDD) - [BDD](#BDD) - [Code Coverage](#Code-Coverage) @@ -1548,20 +1548,42 @@ And then go to **RUN** and check **THREAD SANITIZER** 👈 ## Testing -## Various types of test method +## Test Double + +**Test Double is a generic term for any case where you replace a production object for testing purposes.** - Mocks - Mocks are pre-programmered with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting. ```swift - +// exaple code will update ``` - Fake + +```swift +// exaple code will update +``` + - Spies + +```swift +// exaple code will update +``` + - Stubs + +```swift +// exaple code will update +``` + - Dummy +```swift +// exaple code will update +``` + + ## TDD