use configbuilder_pattern_builder::ApplicationConfig;
fn must<T, E>(result: Result<T, E>) -> T {
result.unwrap_or_else(|_| std::process::abort())
}
#[test]
fn test_application_config_deserializes_from_real_toml() {
let raw = "config_dir = \"/etc/my-app\"";
let cfg: ApplicationConfig = must(toml::from_str(raw));
assert_eq!(cfg.config_dir.as_deref(), Some("/etc/my-app"));
}
#[test]
fn test_application_config_defaults_when_empty() {
let cfg: ApplicationConfig = must(toml::from_str(""));
assert!(cfg.config_dir.is_none());
}