Example #1
0
        public void TestMethod1()
        {
            DERMSInterface.CIM c = DERMSInterface.CIM.loadConfigFile("testConfig.xml");
            int rc = c.createDERGroup("dergroup1", null);

            Console.WriteLine("xml : " + c.LastMessageSent + c.LastMessageReceived);
            Assert.IsTrue(c.LastMessageSent.Length > 100);
            Assert.IsTrue(c.LastMessageReceived.Length > 100);
            Assert.AreEqual(rc, 0);
        }
Example #2
0
        /// <summary>
        /// call the Create DER SOAP function
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void createButton_Click(object sender, EventArgs e)
        {
            DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim);
            int      rc           = 1;
            DateTime now          = DateTime.Now;

            try
            {
                // call the create DER SOAP method
                rc = cs.createDERGroup(_group.GroupName, null);
                logControl1.addEntry(now, LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived);
            }
            catch (Exception ex)
            {
                if (cs.LastMessageSent.Length > 0)
                {
                    logControl1.addEntry(now, LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                }
                logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString());
            }
        }
Example #3
0
 /// <summary>
 /// call the Create DER SOAP function
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void createButton_Click(object sender, EventArgs e)
 {
     DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim);
     int rc = 1;
     DateTime now = DateTime.Now;
     try
     {
         // call the create DER SOAP method
         rc = cs.createDERGroup(_group.GroupName, null);
         logControl1.addEntry(now, LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
         logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived);
     }
     catch (Exception ex)
     {
         if (cs.LastMessageSent.Length > 0)
             logControl1.addEntry(now, LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
         logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString());
     }
 }