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

Function test_extract_java

atomic-semantic/src/parsers/mod.rs:593–603  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

591
592 #[test]
593 fn test_extract_java() {
594 let mut registry = ParserRegistry::new();
595 let source = "public class UserService {\n public String greet(String name) {\n return \"Hello, \" + name;\n }\n}\n";
596 let entities = registry.extract("UserService.java", source);
597 assert!(!entities.is_empty());
598 assert!(
599 entities.iter().any(|e| e.name == "UserService"),
600 "Should find UserService class, got: {:?}",
601 entities.iter().map(|e| &e.name).collect::<Vec<_>>()
602 );
603 }
604
605 #[test]
606 fn test_extract_empty_source() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected