public void AddParticipantWhenInviteAccepted() { PopulateContext(); var testUseCase = new ReplyUseCase(_context, _participantFactory, _eventRepository, _invitationRepository); testUseCase.Execute(new ReplyDTO(invitationTestGuid, true)); var @event = _context.Find <Infrastructure.Entities.Event>(eventTestGuid); var invitation = _context.Find <Infrastructure.Entities.Invitation>(invitationTestGuid); var par = _context.Participants.ToList(); Assert.Equal(InvitationStatus.Accepted, invitation.InvitationStatus); Assert.NotEmpty(@event.Participants); }
public IInvitation GetById(Guid id) { return(_context.Find <Entities.Invitation>(id)); }