Skip to content

Instantly share code, notes, and snippets.

@cprieto
Created September 10, 2009 04:07
Show Gist options
  • Save cprieto/184285 to your computer and use it in GitHub Desktop.
Save cprieto/184285 to your computer and use it in GitHub Desktop.
[Subject("Registering a user")]
public class when_username_already_exists : Membership_service_subscription_context
{
static Exception exception;
Because of = () => {
signup.Username = "username";
exception = Catch.Exception(() => suo.Register(signup));
};
It must_throw_a_validation_exception = () => {
exception.ShouldNotBeNull();
exception.ShouldBeOfType<ValidationException>();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment