Created
September 15, 2011 07:33
-
-
Save andreasohlund/1218743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [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