public void AddSMSHistoryTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
        }
        public void GetReportStatisticsTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
            var r = ReportStatisticsDB.GetReportStatistics(sms.SerialNumber, sms.SendTime);

            Assert.IsNotNull(r);
        }
Beispiel #3
0
 private static bool frSMSOriginal_ReceiveMessage(RabbitMQHelper mq, string message)
 {
     try
     {
         var rs = JsonSerialize.Instance.Deserialize <ReportStatistics>(message);
         ReportStatisticsDB.AddSMSHistory(rs);
     }
     catch (Exception ex)
     {
         LogClient.LogHelper.LogError("StatusReport", "StatusReportHost.frSMSOriginal_ReceiveMessage", ex.ToString());
     }
     return(true);
 }
        public void UpdateTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
            var r = ReportStatisticsDB.GetReportStatistics(sms.SerialNumber, sms.SendTime);

            Assert.IsNotNull(r);
            ReportStatistics rs = new ReportStatistics()
            {
                SerialNumber = sms.SerialNumber,
                SendCount    = 100,
                SendTime     = sms.SendTime
            };

            b = ReportStatisticsDB.Update("account", rs);
            Assert.IsTrue(b);
        }
Beispiel #5
0
 internal void Send(SMSDTO sms)
 {
     ReportStatisticsDB.AddSMSHistory(new ReportStatistics(sms.Message));
     fqSMS.PublishMessage(JsonConvert.SerializeObject(sms), sms.Message.SMSLevel);
 }
Beispiel #6
0
 public static void Send(SMSDTO sms)
 {
     ReportStatisticsDB.AddSMSHistory(new ReportStatistics(sms.Message));
 }