Skip to content

Instantly share code, notes, and snippets.

@mathiasverraes
Forked from yreynhout/Authorization.cs
Created May 12, 2014 19:54
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 mathiasverraes/f3a9229d9a54ba5be862 to your computer and use it in GitHub Desktop.
Save mathiasverraes/f3a9229d9a54ba5be862 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