ito_domain/modules/
mod.rs1mod repository;
7
8pub use repository::ModuleRepository;
9
10use std::path::PathBuf;
11
12#[derive(Debug, Clone)]
14pub struct Module {
15 pub id: String,
17 pub name: String,
19 pub description: Option<String>,
21 pub path: PathBuf,
23}
24
25#[derive(Debug, Clone)]
27pub struct ModuleSummary {
28 pub id: String,
30 pub name: String,
32 pub change_count: u32,
34}
35
36#[cfg(test)]
37mod tests {
38 use super::*;
39
40 #[test]
41 fn test_module_creation() {
42 let module = Module {
43 id: "005".to_string(),
44 name: "dev-tooling".to_string(),
45 description: Some("Development tooling".to_string()),
46 path: PathBuf::from("/test"),
47 };
48
49 assert_eq!(module.id, "005");
50 assert_eq!(module.name, "dev-tooling");
51 }
52
53 #[test]
54 fn test_module_summary() {
55 let summary = ModuleSummary {
56 id: "005".to_string(),
57 name: "dev-tooling".to_string(),
58 change_count: 3,
59 };
60
61 assert_eq!(summary.change_count, 3);
62 }
63}