public async Task Prepare_DocuSign_Events_For_Storage_Envelope_Run() { var runUrl = GetTerminalRunUrl(); var dataDTO = await HealthMonitor_FixtureData.Prepare_DocuSign_Events_For_Storage_v1_InitialConfiguration_Fr8DataDTO(this); var date = DateTime.Now.ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern); var envelopeId = Guid.NewGuid().ToString(); var accountId = "*****@*****.**"; var eventId = Guid.NewGuid().ToString(); var recipientId = Guid.NewGuid().ToString(); var envelopePayload = HealthMonitor_FixtureData.GetEnvelopePayload(); AddPayloadCrate( dataDTO, new EventReportCM() { EventPayload = envelopePayload, EventNames = "Receive Envelope" } ); AddOperationalStateCrate(dataDTO, new OperationalStateCM()); var responsePayloadDTO = await HttpPostAsync <Fr8DataDTO, PayloadDTO>(runUrl, dataDTO); var crateStorage = Crate.GetStorage(responsePayloadDTO); Assert.AreEqual(1, crateStorage.CrateContentsOfType <DocuSignEnvelopeCM_v2>(x => x.Label == "DocuSign Envelope").Count()); }
public async Task Monitor_DocuSign_Run_TemplateValue() { var envelopeId = Guid.NewGuid().ToString(); var configureUrl = GetTerminalConfigureUrl(); var runUrl = GetTerminalRunUrl(); var activityDTO = await GetActivityDTO_WithTemplateValue(); var authToken = await HealthMonitor_FixtureData.DocuSign_AuthToken(this); activityDTO.Item1.AuthToken = authToken; var dataDTO = new Fr8DataDTO { ActivityDTO = activityDTO.Item1 }; var preparedActionDTO = await HttpPostAsync <Fr8DataDTO, ActivityDTO>(configureUrl, dataDTO); dataDTO.ActivityDTO = preparedActionDTO; AddOperationalStateCrate(dataDTO, new OperationalStateCM()); AddPayloadCrate( dataDTO, new EventReportCM { EventPayload = HealthMonitor_FixtureData.GetEnvelopePayload() } ); preparedActionDTO.AuthToken = authToken; var responsePayloadDTO = await HttpPostAsync <Fr8DataDTO, PayloadDTO>(runUrl, dataDTO); var crateStorage = Crate.GetStorage(responsePayloadDTO); var docuSignPayload = crateStorage.CrateContentsOfType <StandardPayloadDataCM>(x => x.Label == "DocuSign Envelope Fields").SingleOrDefault(); Assert.IsNotNull(docuSignPayload, "Crate with DocuSign envelope fields was not found in payload"); Assert.AreEqual(16, docuSignPayload.AllValues().Count(), "DocuSign envelope fields count doesn't match expected value"); }
public async Task Monitor_DocuSign_Run_RecipientValue() { var envelopeId = Guid.NewGuid().ToString(); var runUrl = GetTerminalRunUrl(); var activityDTO = await GetActivityDTO_WithRecipientValue(); var dataDTO = new Fr8DataDTO { ActivityDTO = activityDTO }; var payload = HealthMonitor_FixtureData.GetEnvelopePayload(); AddPayloadCrate( dataDTO, new EventReportCM() { EventPayload = payload, EventNames = string.Join(",", DocuSignEventNames.GetAllEventNames()) } ); AddOperationalStateCrate(dataDTO, new OperationalStateCM()); var responsePayloadDTO = await HttpPostAsync <Fr8DataDTO, PayloadDTO>(runUrl, dataDTO); var crateStorage = Crate.GetStorage(responsePayloadDTO); Assert.AreEqual(1, crateStorage.CrateContentsOfType <StandardPayloadDataCM>(x => x.Label == "DocuSign Envelope Fields").Count()); var docuSignPayload = crateStorage.CrateContentsOfType <StandardPayloadDataCM>(x => x.Label == "DocuSign Envelope Fields").Single(); Assert.AreEqual(1, docuSignPayload.AllValues().Count(x => x.Key == "CurrentRecipientEmail")); Assert.IsTrue(docuSignPayload.AllValues().Any(x => x.Key == "CurrentRecipientEmail" && x.Value == "*****@*****.**")); }