moq webminar
DESCRIPTION
Summary of MOQ featuresTRANSCRIPT
![Page 1: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/1.jpg)
MOQMariano RodriguezArchitect, Tellago, Tellago Studios
![Page 2: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/2.jpg)
Agenda
• What is a Mock• MOQ Features• AAA mocking pattern• Questions
![Page 3: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/3.jpg)
What is a Mock
• Test Double / Stand-in• Like an object’s stunt double• Use to replace dependencies• Mimics the behavior of the real
object
![Page 4: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/4.jpg)
MOQ Features
• Simple Fluent API• Strict or Loose Mocking• Mocks with expression / matchers• Assert occurrences of invocations• MOQ Queryable• Sequence
![Page 5: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/5.jpg)
MOQ Features
• Raise events on calls• Recursive mocking• What can I mock:• Virtual Properties/Methods/Events• Interfaces• Virtual protected
methods/Properties• Stub properties
![Page 6: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/6.jpg)
AAA Pattern
• Arrange all preconditions and inputs• Act on the object under test• Assert expectations
![Page 7: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/7.jpg)
Demos
![Page 8: MOQ Webminar](https://reader036.vdocument.in/reader036/viewer/2022062405/5577cab3d8b42ae0418b4853/html5/thumbnails/8.jpg)
Questions?