Skip to content

Instantly share code, notes, and snippets.

@yreynhout
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yreynhout/11376695 to your computer and use it in GitHub Desktop.
Save yreynhout/11376695 to your computer and use it in GitHub Desktop.
Spiking Projac.Testing
[TestFixture]
public class SomeProjectionTests
{
[Test]
public void HandlesSomeEventAsExpected()
{
new TSqlProjectionScenario(TSqlProjection projection). //after renaming TSqlProjectionSpecification to TSqlProjection ;-)
Given(params object[] events).
Given(IEnumerable<object> events).
GivenNone().
When(object @event).
ThenCount(TSqlQueryStatement query, int count). //or ExpectCount/VerifyCount
Assert(); // Extension method that executes the test specification (and knows the connection string).
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment