()
| 104 | |
| 105 | #[test] |
| 106 | fn test_detect_with_gradle_layout() { |
| 107 | let temp = TempDir::new().unwrap(); |
| 108 | let project_root = temp.path(); |
| 109 | |
| 110 | // Create Gradle project structure (line 560 coverage) |
| 111 | fs::create_dir_all(project_root.join("app")).unwrap(); |
| 112 | fs::write( |
| 113 | project_root.join("build.gradle.kts"), |
| 114 | "plugins { id(\"java\") }", |
| 115 | ) |
| 116 | .unwrap(); |
| 117 | fs::write( |
| 118 | project_root.join("settings.gradle.kts"), |
| 119 | "rootProject.name = \"test\"", |
| 120 | ) |
| 121 | .unwrap(); |
| 122 | fs::write( |
| 123 | project_root.join("app/build.gradle.kts"), |
| 124 | "plugins { id(\"java\") }", |
| 125 | ) |
| 126 | .unwrap(); |
| 127 | |
| 128 | let detector = catalog_detector(); |
| 129 | let mut cache = ContentCache::new(); |
| 130 | let detections = detector.detect(project_root, &mut cache).unwrap(); |
| 131 | |
| 132 | // Should detect Gradle |
| 133 | assert!( |
| 134 | !detections.is_empty(), |
| 135 | "Should detect Gradle from build files" |
| 136 | ); |
| 137 | } |
| 138 | |
| 139 | #[test] |
| 140 | fn test_detect_with_explicit_config_files() { |
nothing calls this directly
no test coverage detected