MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_identity_usage_json_roundtrip

Function test_identity_usage_json_roundtrip

atomic-identity/src/usage.rs:305–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 #[test]
305 fn test_identity_usage_json_roundtrip() {
306 let usages = vec![
307 IdentityUsage::Personal,
308 IdentityUsage::Work,
309 IdentityUsage::Community,
310 IdentityUsage::Bot,
311 IdentityUsage::Custom("consulting".to_string()),
312 ];
313
314 for usage in usages {
315 let json = serde_json::to_string(&usage).unwrap();
316 let recovered: IdentityUsage = serde_json::from_str(&json).unwrap();
317 assert_eq!(usage, recovered);
318 }
319 }
320
321 #[test]
322 fn test_identity_usage_equality() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected