use openlark_core::config::Config;
use std::sync::Arc;
#[derive(Clone)]
#[allow(dead_code)]
pub struct ApplicationService {
config: Arc<Config>,
}
impl ApplicationService {
pub fn new(config: Config) -> Self {
Self {
config: Arc::new(config),
}
}
#[cfg(feature = "v1")]
pub fn v1(&self) -> crate::application::application::v1::ApplicationV1 {
crate::application::application::v1::ApplicationV1::new(self.config.clone())
}
}
#[cfg(test)]
#[allow(unused_imports)]
mod tests {
#[test]
fn test_serialization_roundtrip() {
let json = r#"{"test": "value"}"#;
assert!(serde_json::from_str::<serde_json::Value>(json).is_ok());
}
#[test]
fn test_deserialization_from_json() {
let json = r#"{"field": "data"}"#;
let value: serde_json::Value = serde_json::from_str(json).expect("JSON 反序列化失败");
assert_eq!(value["field"], "data");
}
}