Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Add missing links to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielf authored May 13, 2024
1 parent ed2b59f commit 2075d39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ In this example, the `register` method has a service call to its collaborators,

Mockists would probably claim that testing how collaborators are called during the test process allows us to test the UserService. Let's move on to the next section and see the mockists' solution in greater detail.

[link-sls-6.26.1]: https://www.scala-lang.org/files/archive/spec/2.11/06-expressions.html#value-conversions

## The Solution

In this sort of situations we need mock implementations of our _collaborator service_. As _Martin Fowler_ puts it in his excellent article [Mocks Aren't Stubs][link-test-doubles]:
Expand All @@ -101,6 +103,8 @@ In this example, we can define these three test cases:

ZIO Test provides a framework for mocking our modules. In the next section, we are going to test `UserService` by mocking its collaborators.

[link-test-doubles]: https://martinfowler.com/articles/mocksArentStubs.html

## Mocking Collaborators

In the previous section, we learned we can test the `UserService` by mocking its collaborators. Let's see how we can mock the `EmailService` and also the `UserRepository`.
Expand Down

0 comments on commit 2075d39

Please sign in to comment.