public void setUpConnector()
 {
     CMPMedica.MMCoreConnector.Factories.MMCoreSettingsFactory.ConnectionSettings.Settings.Add("MMCSRVC_MMCORE_HOST", "localhost");
     CMPMedica.MMCoreConnector.Factories.MMCoreSettingsFactory.ConnectionSettings.Settings.Add("MMCSRVC_MMCORE_PORT", "8088");
     services = MMCoreServicesFactory.Services;
     services.SetupServices();
 }
Exemple #2
0
        /**
         * Test.
         *
         * @throws Exception
         *             the exception
         */
        public void testSendReceiveBasicTest()
        {
            Console.WriteLine("Starting test 01 (Create, Send, Receive)");
            CMPMedica.MMCoreConnector.Factories.MMCoreSettingsFactory.ConnectionSettings.Settings.Add("MMCSRVC_MMCORE_HOST", "localhost");
            CMPMedica.MMCoreConnector.Factories.MMCoreSettingsFactory.ConnectionSettings.Settings.Add("MMCSRVC_MMCORE_PORT", "8088");
            services = MMCoreServicesFactory.Services;
            services.SetupServices();
            content = System.Text.ASCIIEncoding.ASCII.GetBytes(contentStr);
            sender  = readOrCreateMBAccount(boxType, type, value, applicationId);
            reimporCert();
            showAccount(sender);
            MMCoreConnector.WRQueueManagement.mproxyIntegrationMessage mim = createTestIntMessage();
            string msgId = sendIntMessage(mim, MMCoreConnector.WRQueueManagement.mailBoxAccountType.MAILBOX_EHEALTH);

            Console.WriteLine("SENT MSG ID: " + msgId);
            verifyNoError(sender.id, msgId);
            System.Threading.Thread.Sleep(10000);
            HashSet <string> msgIds = receiveMessageIds(sender.id);

            if (msgIds.Contains(msgId))
            {
                Console.WriteLine("The MESSAGE:" + msgId + " is received");
            }
            else
            {
                throw new Exception("The MESSAGE:" + msgId + " is NOT received!");
            }
            fetchMessage(sender.id, msgId);
            deleteMessage(sender.id, msgId);
        }