Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created September 15, 2011 07:33
Show Gist options
  • Select an option

  • Save andreasohlund/1218743 to your computer and use it in GitHub Desktop.

Select an option

Save andreasohlund/1218743 to your computer and use it in GitHub Desktop.
[Subject("Inviting known users")]
public class When_adding_a_member_that_already_has_a_open_invite_for_institution : HandlerConcern<InviteMemberToInstitutionEntitlementHandler>
{
static readonly string email = "email@server,com";
static readonly Guid institutionEntitlementId = Guid.NewGuid();
Establish context = () =>
{
session.Store(new EntitlementInvitationsView
{
InstitutionEntitlementId = institutionEntitlementId,
Accepted = true,
Email = email
});
session.SaveChanges();
};
Because of = () =>
Subject.Consume(new InviteMemberToInstitutionEntitlement
{
Email = email,
InstitutionEntitlementId = institutionEntitlementId
});
It should_not_invite_the_member = () =>
ShouldNotStoreAggregate();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment