Beispiel #1
0
        public void TestSendSmsInValidNumber()
        {
            var sms = new SMSCentre.SMSC(_login, _password);
            var res = sms.SendSms("111", "Test");

            Assert.True(res is ISmsResult);
            Assert.True(res is SmsErrorResult);
            var smsRes = res as SmsErrorResult;

            Assert.Equal(-7, smsRes.Status);
            Assert.NotEmpty(smsRes.Id);
        }
Beispiel #2
0
        public void TestSendSmsValidNumber()
        {
            var message = "Test";
            var sms     = new SMSCentre.SMSC(_login, _password);
            var res     = sms.SendSms(_phone, message);

            Assert.True(res is ISmsResult);
            Assert.True(res is SmsResult);
            var smsRes = res as SmsResult;

            Assert.Equal(_phone, smsRes.Phone);
            Assert.Equal(message, smsRes.Text);
            Assert.True(smsRes.Balance > 0);
            Assert.True(smsRes.Cost > 0);
        }