Skip to content

Instantly share code, notes, and snippets.

@yreynhout
Created May 12, 2014 12:24
Show Gist options
  • Save yreynhout/c2733c6b44fe28ae03e5 to your computer and use it in GitHub Desktop.
Save yreynhout/c2733c6b44fe28ae03e5 to your computer and use it in GitHub Desktop.
[TestFixture]
public class AuthorizationSpecifications
{
[Test]
public void WhoAreYouGonnaCall()
{
new AuthorizationScenario().
Given(events).
When(command).
InvokedBy(subject/identity).
ExpectAllowed()/ExpectDenied().
Assert();
new AuthorizationScenarioFor(subject/identity).
Given(events).
When(command).
ExpectAllowed()/ExpectDenied().
Assert();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment