use mecha10_cli::services::init_service::*;
use tempfile::TempDir;
#[test]
fn test_init_service_creation() {
let _service = InitService::new();
}
#[tokio::test]
async fn test_create_project_directories() -> Result<()> {
let temp = TempDir::new()?;
let service = InitService::new();
service.create_project_directories(temp.path()).await?;
assert!(temp.path().join("nodes").exists());
assert!(temp.path().join("drivers").exists());
assert!(temp.path().join("types").exists());
assert!(temp.path().join("behaviors").exists());
assert!(temp.path().join("config").exists());
assert!(temp.path().join("logs").exists());
assert!(temp.path().join("simulation").exists());
assert!(temp.path().join("nodes").join(".gitkeep").exists());
assert!(temp.path().join("drivers").join(".gitkeep").exists());
Ok(())
}
#[test]
fn test_detect_framework_path_not_in_monorepo() {
let service = InitService::new();
let result = service.detect_framework_path();
assert!(result.is_err());
}