Exemple #1
0
        public void NotifyConsistencyService(FormResponseDetail hierarchicalFormResponseDetail)
        {
            var serviceBusCRUD = new ServiceBusCRUD();

            //send notification to ServiceBus
            serviceBusCRUD.SendMessagesToTopic(hierarchicalFormResponseDetail);
            //ConsistencyHack(hierarchicalResponse);
        }
Exemple #2
0
        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);
            }
        }