Exemple #1
0
        public void TestSmsStatusInCorrectId()
        {
            var sms = new SMSCentre.SMSC(_login, _password);
            var res = sms.GetStatus("11111111111", _phone);

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

            Assert.Equal(-3, smsRes.Status);
            Assert.Equal("11111111111", smsRes.Id);
        }
Exemple #2
0
        public void TestSmsStatus()
        {
            var sms = new SMSCentre.SMSC(_login, _password);
            var res = sms.GetStatus("1", _phone);

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

            Assert.Equal(1, smsRes.Status);
            Assert.Equal("Доставлено", smsRes.StatusDescription);
            Assert.Equal("Filuet", smsRes.Sender);
            Assert.Equal("Test", smsRes.Text);
        }