()
| 51 | |
| 52 | #[test] |
| 53 | fn test_preference_init() -> Result<()> { |
| 54 | let test_dir = setup_test_dir(); |
| 55 | |
| 56 | let prefs = PreferenceConfig::new(test_dir.clone())?; |
| 57 | |
| 58 | // Verify the config file exists |
| 59 | let config_file = prefs.config_file.lock().unwrap(); |
| 60 | assert!( |
| 61 | config_file.exists(), |
| 62 | "Config file should be created during initialization" |
| 63 | ); |
| 64 | |
| 65 | // Verify memcache is initialized as an object |
| 66 | // Note: The memcache might not be empty as it could contain default values |
| 67 | let memcache = prefs.memcache.lock().unwrap(); |
| 68 | assert!( |
| 69 | memcache.is_object(), |
| 70 | "Memcache should be initialized as an object" |
| 71 | ); |
| 72 | |
| 73 | cleanup_test_dir(test_dir); |
| 74 | Ok(()) |
| 75 | } |
| 76 | |
| 77 | #[test] |
| 78 | fn test_save_and_load_selective() -> Result<()> { |
nothing calls this directly
no test coverage detected