For AI agents: visit https://specsfor.readme.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
Jump to Content
SpecsForGuides
GuidesDiscussions
v1.0

GuidesSpecsFor
Guides
v1.0GuidesDiscussions

Start Here

  • Welcome!
  • Beginner's Quickstart
  • Advanced Quickstart
  • About SpecsFor
  • ReSharper Templates

How do I...?

  • Create a basic spec
  • Structure my specs
  • Set up a mock object
  • Verify a method was called on another object
  • Register a concrete type in the auto-mocking container
  • Reduce duplication and noise in my specs

Basics

  • SpecsFor overview
  • Given, When, Then
  • The System Under Test (SUT)
  • SpecsFor lifecycle
  • About auto-mocking
  • Establishing context with 'Given'
  • Performing an action with 'When'
  • Verifying with 'Then'

Assertions

  • The Should library
  • Additional "Should" assertions
  • Partial matching: 'ShouldLookLike' and 'LooksLike'
  • Fuzzy Checks with Some and Any Values
  • SpecsFor<Web> Helpers

Mocks

  • SpecsFor and mocking
  • Configuring mock objects
  • Verifying interactions with mocks
  • Substituting your own fake objects

Sharing Context

  • Intro to context classes

Convention System

  • Overview
  • Creating a configuration class
  • Applying a behavior to all specs
  • Creating a behavior
  • Using a behavior to define state
  • Wrapping a spec with a behavior
  • Samples

Advanced Topics

  • Integration testing with MongoDB
  • Integration testing with Entity Framework
  • Writing specs for ASP.NET MVC
  • Using SpecsFor.Mvc with Windows Authentication
Powered by 

Verifying interactions with mocks

Suggest Edits

COMING SOON

📘

This page has low-value in the documentation and may be removed. Feel free to improve it if you would like to see it stick around!

Moq quickstart

Updated less than a minute ago


Did this page help you?