public SMSRUSmsService(SmsServiceConfiguration configuration)
 {
     if (configuration.ServiceName != SmsServiceTypes.SMSRU)
     {
         throw new ArgumentException($"{nameof(SmsServiceConfiguration.ServiceName)} should be {SmsServiceTypes.SMSRU}.", nameof(configuration));
     }
     _configuration = (SMSRUServiceConfiguration)configuration;
 }
Exemple #2
0
        public async Task SMSRUSendSmsTest()
        {
            SmsServiceConfiguration configuration = new SMSRUServiceConfiguration
            {
                ApiId       = "051182F3-7898-AC6D-8233-803B74BF10ED",
                ServiceName = SmsServiceTypes.SMSRU,
                PartnerId   = "295663",
                Test        = true
            };
            ISmsService service = new SMSRUSmsService(configuration);

            Assert.True(await service.SendAsync("79131743886", "TEST-ТЕСТ"));
        }