update Test Double

This commit is contained in:
Jungpyo Hong 2021-08-12 21:15:25 -05:00 committed by GitHub
parent b5d58278cb
commit a8309fd858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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