fache/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mod shawn;
mod wework;
mod wxpay;
// 重新组织所有内容到all下面进行导出
pub mod all {
    pub mod shawn {
        pub use crate::shawn::shawn::*;
    }
    pub mod wxpay {
        pub use crate::wxpay::utils::*;
        pub use crate::wxpay::wxpay::*;
        pub use crate::wxpay::wxtype::*;
    }

    pub mod wework {
        pub use crate::wework::group::group::*;
        pub use crate::wework::*;
    }
}
#[cfg(test)]
pub(crate) mod fache {
    // use super::all::*;
    use tokio::test as tokio_test; // 引入 tokio 的测试属性
    #[test]
    pub fn init_wxpay() {
        print!("123");
    }
    #[tokio_test]
    pub async fn init_wework() {
        // 创建文本消息
        // let message = MsgText::new(
        //     "广州今日天气:29度,大部分多云,降雨概率:60%",
        //     vec!["wangqing", "@all"],
        //     vec!["13800001111", "@all"],
        // );
        // let wework = WeWork {
        //     key: "".to_owned(),
        //     message: message,
        // };
        // wework.send().await;
    }
}