(t *testing.T)
| 129 | } |
| 130 | |
| 131 | func TestGetCurrentStep(t *testing.T) { |
| 132 | plan := NewExecutionPlan("Test plan") |
| 133 | plan.AddStep("tool1", "Step 1", nil) |
| 134 | plan.AddStep("tool2", "Step 2", nil) |
| 135 | |
| 136 | // Initially current step is 0 |
| 137 | step := plan.GetCurrentStep() |
| 138 | if step == nil { |
| 139 | t.Fatal("expected non-nil current step") |
| 140 | } |
| 141 | if step.ToolName != "tool1" { |
| 142 | t.Errorf("expected tool1, got %q", step.ToolName) |
| 143 | } |
| 144 | |
| 145 | // Change current step |
| 146 | plan.CurrentStep = 1 |
| 147 | step = plan.GetCurrentStep() |
| 148 | if step.ToolName != "tool2" { |
| 149 | t.Errorf("expected tool2, got %q", step.ToolName) |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | func TestIsCompleted(t *testing.T) { |
| 154 | tests := []struct { |
nothing calls this directly
no test coverage detected