Example #1
0
        public void AddSmsDevice_InvalidEventTriggerType_Failure()
        {
            var res = NotificationDevice.AddSmsDevice(_connectionServer, "objectid", "devicename", "providerID", "*****@*****.**",
                                                      "*****@*****.**", "bogusevent", true);

            Assert.IsFalse(res.Success, "Calling AddSmsDevice with invalid event type trigger did not fail");
        }
        public void AddSmsDevice_EmptySender_Failure()
        {
            var res = NotificationDevice.AddSmsDevice(_mockServer, "objectid", "SMSDevice", "aaa", "*****@*****.**", "",
                                                      NotificationEventTypes.NewVoiceMail.ToString(), true);

            Assert.IsFalse(res.Success, "Empty sender parameter should fail");
        }
        public void AddSmsDevice_EmptySenderAddress_Failure()
        {
            var res = NotificationDevice.AddSmsDevice(_mockServer, "objectid", "devicename", "providerID", "*****@*****.**",
                                                      "", "eventtype", true);

            Assert.IsFalse(res.Success, "Calling AddSmsDevice with empty senderaddress did not fail");
        }
Example #4
0
        public void AddSmsDevice_InvalidSmppProvider_Failure()
        {
            var res = NotificationDevice.AddSmsDevice(_connectionServer, _tempUser.ObjectId, "SMSDevice", "aaa",
                                                      "*****@*****.**", "*****@*****.**",
                                                      NotificationEventTypes.NewVoiceMail.ToString(), true);

            Assert.IsFalse(res.Success, "Invalid SMPP provider Id should fail");
        }
        public void AddSmsDevice_NullConnectionServer_Failure()
        {
            //since we can't add an SMS device without a provider (which we can't dummy up) just hit the failure routes here and call
            //it good.
            WebCallResult res = NotificationDevice.AddSmsDevice(null, "objectid", "SMSDevice", "aaa", "*****@*****.**", "*****@*****.**",
                                                                NotificationEventTypes.NewVoiceMail.ToString(), true);

            Assert.IsFalse(res.Success, "Null Connection server param should fail");
        }
Example #6
0
        public void NotificationDevice_AddSmsDevice()
        {
            List <SmppProvider> oProviders;
            var res = SmppProvider.GetSmppProviders(_connectionServer, out oProviders);

            Assert.IsTrue(res.Success, "Failed fetching SMPP providers:" + res);
            Assert.IsTrue(oProviders.Count > 0, "No SMPP providers found");

            res = NotificationDevice.AddSmsDevice(_connectionServer, _tempUser.ObjectId, Guid.NewGuid().ToString(),
                                                  oProviders[0].ObjectId, "*****@*****.**", "*****@*****.**",
                                                  "DispatchMessage", true);

            Assert.IsTrue(res.Success, "Failed to create new SMS notification device:" + res);
        }