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:940–957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

938
939 #[test]
940 fn test_extract_class_with_extends() {
941 let mut parser = JavaParser::new();
942 let source = r#"
943public class Admin extends User implements Serializable, Comparable<Admin> {
944}
945"#;
946 let entities = parser.extract(source, "Admin.java");
947
948 let admin = entities.iter().find(|e| e.name == "Admin").unwrap();
949 let sig = admin.signature.as_ref().unwrap();
950 // The exact format depends on tree-sitter's field names for Java,
951 // but should contain the class name at minimum
952 assert!(
953 sig.contains("Admin"),
954 "Signature should contain Admin: {}",
955 sig
956 );
957 }
958
959 #[test]
960 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