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

Function test_entity_serialization

atomic-semantic/src/entity.rs:381–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379
380 #[test]
381 fn test_entity_serialization() {
382 let entity =
383 Entity::new("MyClass", EntityKind::Class, "src/model.ts", 5, 50).with_exported(true);
384
385 let json = serde_json::to_string(&entity).unwrap();
386 assert!(json.contains("\"name\":\"MyClass\""));
387 assert!(json.contains("\"kind\":\"class\""));
388 assert!(json.contains("\"exported\":true"));
389 }
390}

Callers

nothing calls this directly

Calls 2

with_exportedMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected