#[cfg(test)] mod tests { use std::collections::HashMap; use spring_sms::config::AliyunSmsConfig; #[tokio::test] async fn test() { let config = AliyunSmsConfig { access_key_id: "xx".to_string(), access_key_secret: "xx".to_string(), sign_name: "xx".to_string(), domain: None, region_id: None, version: None, }; let sms_config = spring_sms::config::SmsConfig { aliyun: Some(config), }; let sms_client = spring_sms::client::SmsClient::new(sms_config); let mut params: HashMap<&str, &str> = HashMap::new(); params.insert("code", "123456"); let res = sms_client.send_sms_by_aliyun("130xxxxxxxx", "SMS_xxxxxx", Some(params)).await; println!("{:?}", res) } }