public bool ReceiveTripDocument(MpEventParticipantDocument tripDoc, string token) { try { _ministryPlatformRestRepository.UsingAuthenticationToken(token).Update(tripDoc); return(true); } catch (Exception e) { _logger.Error($"Failed to save trip document for {tripDoc.EventParticipantId}"); _logger.Error(e.Message); throw; } }
public void ShouldUpdateTripDocuments() { var mockDoc = new MpEventParticipantDocument { EventParticipantDocumentId = 1, DocumentId = 10, EventParticipantId = 1234, Received = true }; _ministryPlatformRest.Setup(m => m.Update(mockDoc, null as string)); var result = _fixture.ReceiveTripDocument(mockDoc, token); _ministryPlatformRest.VerifyAll(); }