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

Function test_inner_class

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

Source from the content-addressed store, hash-verified

1039
1040 #[test]
1041 fn test_inner_class() {
1042 let mut parser = JavaParser::new();
1043 let source = r#"
1044public class Outer {
1045 public class Inner {
1046 public void innerMethod() {}
1047 }
1048}
1049"#;
1050 let entities = parser.extract(source, "Outer.java");
1051
1052 assert!(
1053 entities.iter().any(|e| e.name == "Outer"),
1054 "Should find Outer class"
1055 );
1056 assert!(
1057 entities.iter().any(|e| e.name == "Inner"),
1058 "Should find Inner class"
1059 );
1060 assert!(
1061 entities.iter().any(|e| e.name == "innerMethod"),
1062 "Should find innerMethod"
1063 );
1064 }
1065
1066 #[test]
1067 fn test_realistic_spring_controller() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected