moq webminar

8
MOQ Mariano Rodriguez Architect, Tellago, Tellago Studios

Upload: mariano-omar-rodriguez

Post on 10-Jun-2015

296 views

Category:

Technology


1 download

DESCRIPTION

Summary of MOQ features

TRANSCRIPT

Page 1: MOQ Webminar

MOQMariano RodriguezArchitect, Tellago, Tellago Studios

Page 2: MOQ Webminar

Agenda

• What is a Mock• MOQ Features• AAA mocking pattern• Questions

Page 3: MOQ Webminar

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

MOQ Features

• Simple Fluent API• Strict or Loose Mocking• Mocks with expression / matchers• Assert occurrences of invocations• MOQ Queryable• Sequence

Page 5: MOQ Webminar

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

AAA Pattern

• Arrange all preconditions and inputs• Act on the object under test• Assert expectations

Page 7: MOQ Webminar

Demos

Page 8: MOQ Webminar

Questions?