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 

Advanced Quickstart

Suggest Edits

COMING SOON

Updated less than a minute ago