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

Function test_entity_builder

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

Source from the content-addressed store, hash-verified

364
365 #[test]
366 fn test_entity_builder() {
367 let entity = Entity::new("authenticate", EntityKind::Function, "src/auth.ts", 10, 25)
368 .with_column(0)
369 .with_signature("async function authenticate(creds: Credentials): Promise<Token>")
370 .with_exported(true);
371
372 assert_eq!(entity.name, "authenticate");
373 assert_eq!(entity.kind, EntityKind::Function);
374 assert_eq!(entity.line, 10);
375 assert_eq!(entity.end_line, 25);
376 assert!(entity.exported);
377 assert!(entity.signature.is_some());
378 }
379
380 #[test]
381 fn test_entity_serialization() {

Callers

nothing calls this directly

Calls 3

with_exportedMethod · 0.80
with_signatureMethod · 0.80
with_columnMethod · 0.80

Tested by

no test coverage detected