public void NotifyConsistencyService(FormResponseDetail hierarchicalFormResponseDetail) { var serviceBusCRUD = new ServiceBusCRUD(); //send notification to ServiceBus serviceBusCRUD.SendMessagesToTopic(hierarchicalFormResponseDetail); //ConsistencyHack(hierarchicalResponse); }
public void ReadServiceBus() { MessagePayload messagePayload = null; messagePayload = ReadMessageFromServiceBus(); if (messagePayload == null) { ServiceBusCRUD _serviceBus = new ServiceBusCRUD(); _serviceBus.SendMessagesToTopic(GetFormResponDetails()); messagePayload = ReadMessageFromServiceBus(); FormResponseDetail _formSurveyData = GetFormResponDetailsFromJson(messagePayload); Assert.AreEqual(FormId, _formSurveyData.FormId); } else { FormResponseDetail formResponsefromServiceBus = JsonConvert.DeserializeObject <FormResponseDetail>(messagePayload.Body); Assert.AreEqual(FormId, formResponsefromServiceBus.FormId); } }