init: archlens — architecture diagram generator
Some checks failed
CI / Check / Test (push) Failing after 1m24s
Some checks failed
CI / Check / Test (push) Failing after 1m24s
Hex arch + DDD, tree-sitter parsing, Mermaid/ASCII output. Supports Rust + Python. 92 tests. CI, diff, --check for staleness detection.
This commit is contained in:
17
crates/application/tests/fakes/diagram_renderer.rs
Normal file
17
crates/application/tests/fakes/diagram_renderer.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use archlens_domain::{CodeGraph, DomainError, RenderOutput, RenderedFile, ports::DiagramRenderer};
|
||||
|
||||
pub struct FakeDiagramRenderer;
|
||||
|
||||
impl FakeDiagramRenderer {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
impl DiagramRenderer for FakeDiagramRenderer {
|
||||
fn render(&self, graph: &CodeGraph) -> Result<RenderOutput, DomainError> {
|
||||
let content = format!("graph with {} elements", graph.elements().len());
|
||||
let file = RenderedFile::new("output.mmd", &content)?;
|
||||
Ok(RenderOutput::single(file))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user