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

Function test_extract_class_with_extends

atomic-semantic/src/parsers/java.rs:963–980  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

961
962 #[test]
963 fn test_extract_class_with_extends() {
964 let mut parser = JavaParser::new();
965 let source = r#"
966public class Admin extends User implements Serializable, Comparable<Admin> {
967}
968"#;
969 let entities = parser.extract(source, "Admin.java");
970
971 let admin = entities.iter().find(|e| e.name == "Admin").unwrap();
972 let sig = admin.signature.as_ref().unwrap();
973 // The exact format depends on tree-sitter's field names for Java,
974 // but should contain the class name at minimum
975 assert!(
976 sig.contains("Admin"),
977 "Signature should contain Admin: {}",
978 sig
979 );
980 }
981
982 #[test]
983 fn test_extract_generic_class() {

Callers

nothing calls this directly

Calls 4

as_refMethod · 0.80
extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected