mecha10-cli 0.7.0

Mecha10 CLI tool
Documentation

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("configs/behaviors").exists());
    assert!(temp.path().join("config").exists());
    assert!(temp.path().join("logs").exists());
    assert!(temp.path().join("configs/simulation").exists());

    Ok(())
}