(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestFilterTasks(t *testing.T) { |
| 159 | tasks := createTestTasks() |
| 160 | g := NewGraph(tasks) |
| 161 | |
| 162 | // Filter to only T1 and T2 |
| 163 | filtered := g.FilterTasks(map[string]bool{ |
| 164 | "T1": true, |
| 165 | "T2": true, |
| 166 | }) |
| 167 | |
| 168 | if len(filtered.Tasks) != 2 { |
| 169 | t.Errorf("Expected 2 filtered tasks, got %d", len(filtered.Tasks)) |
| 170 | } |
| 171 | |
| 172 | if _, exists := filtered.TaskMap["T1"]; !exists { |
| 173 | t.Error("Expected T1 in filtered graph") |
| 174 | } |
| 175 | |
| 176 | if _, exists := filtered.TaskMap["T2"]; !exists { |
| 177 | t.Error("Expected T2 in filtered graph") |
| 178 | } |
| 179 | |
| 180 | if _, exists := filtered.TaskMap["T3"]; exists { |
| 181 | t.Error("Did not expect T3 in filtered graph") |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func TestToMermaid(t *testing.T) { |
| 186 | tasks := []*model.Task{ |
nothing calls this directly
no test coverage detected