Esempio n. 1
0
        public static XmlDocument TestPollrequest()
        {
            ReferenceDataManager.SetSource(ReferenceDataManager.SourceTypes.ConfigFile);

            IConfigurationRepository configurationRepository = new ConfigFileConfigurationRepository();
            ILoggingService loggingService = new Log4NetLoggingService(configurationRepository, new ThreadContextService());

            GovTalkMessageCreator submitPollCreator = new GovTalkMessageCreator(new SubmitPollMesageBuilder(loggingService), loggingService);

            submitPollCreator.SetCorrelationId("FDE7675B3DCA4EFF89DACECA07751B98");

            submitPollCreator.CreateGovTalkMessage();

            XmlDocument xd = submitPollCreator.SerializeGovTalkMessage();

            xd.Save(@"c:\Temp\pollsubmit-" + DateTime.Now.ToString("_yyyy_MM_dd_HH_mm_ss", System.Globalization.CultureInfo.InvariantCulture) + ".xml");

            return xd;
        }
Esempio n. 2
0
        public static XmlDocument TestDeleteRequest()
        {
            ReferenceDataManager.SetSource(ReferenceDataManager.SourceTypes.ConfigFile);
            IConfigurationRepository configurationRepository = new ConfigFileConfigurationRepository();
            ILoggingService loggingService = new Log4NetLoggingService(configurationRepository, new ThreadContextService());

            GovTalkMessageCreator deleteRequestCreator = new GovTalkMessageCreator(new DeleteRequestMessageBuilder(loggingService), loggingService);
            deleteRequestCreator.SetCorrelationId("87E1E8A7F16147A6B87962E07933B406");

            deleteRequestCreator.CreateGovTalkMessage();

            XmlDocument xd = deleteRequestCreator.SerializeGovTalkMessage();

            GovTalkMessageHelper helper = new GovTalkMessageHelper(configurationRepository, loggingService);
            xd = helper.UpdateMessageForProductionGateway(xd);

            return xd;
        }