puerto 0.10.0

Puerto — Rust full-stack DDD framework CLI. Scaffolds Clean Architecture projects with auto-wired DI, SQLx support, and zero manual wiring. Formerly puerto-framework.
use std::sync::Arc;

use async_trait::async_trait;

use crate::domain::{{ snake }}::{
    errors::{{ pascal }}Error,
    model::{{ pascal }},
    repository::{{ pascal }}RepositoryTrait,
    use_cases::{{ uc }}::{{ "{" }}{{ uc_pascal }}Params, {{ uc_pascal }}UseCaseTrait},
};

pub struct {{ uc_pascal }}UseCaseImpl {
    pub repository: Arc<dyn {{ pascal }}RepositoryTrait>,
}

#[async_trait]
impl {{ uc_pascal }}UseCaseTrait for {{ uc_pascal }}UseCaseImpl {
    async fn execute(&self, params: {{ uc_pascal }}Params) -> Result<{{ pascal }}, {{ pascal }}Error> {
        tracing::info!(?params, "{{ uc }}: start");
        todo!()
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::domain::{{ snake }}::repository::mocks::Mock{{ pascal }}Repository;


    #[tokio::test]
    async fn should_{{ uc }}_when_valid() {
        // Arrange
        let mock_repo = Mock{{ pascal }}Repository::new();
        let use_case = {{ uc_pascal }}UseCaseImpl {
            repository: Arc::new(mock_repo),
        };

        // Act
        // TODO: implement test body
        let _ = &use_case;
    }
}