MCPcopy Create free account
hub / github.com/dallay/agentsync / test_detect_with_gradle_layout

Function test_detect_with_gradle_layout

tests/unit/detect_coverage.rs:106–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105#[test]
106fn 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]
140fn test_detect_with_explicit_config_files() {

Callers

nothing calls this directly

Calls 2

catalog_detectorFunction · 0.70
detectMethod · 0.45

Tested by

no test coverage detected