How to Check How Many Times Mocked Methods Are Called in Unit Tests
webdeveloperdiary.substack.com
In last week’s part, we looked at two ways to check that methods on our Moq testing mocks were called as part of our unit and integration tests. One way was to set up a callback on our mock to add to a collection, e.g. a List. This can make data easier to work with when writing assertions but means introducing additional variables in the test.
How to Check How Many Times Mocked Methods Are Called in Unit Tests
How to Check How Many Times Mocked Methods…
How to Check How Many Times Mocked Methods Are Called in Unit Tests
In last week’s part, we looked at two ways to check that methods on our Moq testing mocks were called as part of our unit and integration tests. One way was to set up a callback on our mock to add to a collection, e.g. a List. This can make data easier to work with when writing assertions but means introducing additional variables in the test.