(t *testing.T)
| 429 | } |
| 430 | |
| 431 | func TestScanResult_Methods(t *testing.T) { |
| 432 | result := &ScanResult{ |
| 433 | Findings: []Finding{{Severity: SeverityCritical}}, |
| 434 | TotalCount: 1, |
| 435 | CriticalCount: 1, |
| 436 | } |
| 437 | |
| 438 | if !result.HasCritical() { |
| 439 | t.Error("HasCritical should return true") |
| 440 | } |
| 441 | if !result.HasHighOrAbove() { |
| 442 | t.Error("HasHighOrAbove should return true") |
| 443 | } |
| 444 | if result.IsClean() { |
| 445 | t.Error("IsClean should return false") |
| 446 | } |
| 447 | |
| 448 | cleanResult := &ScanResult{TotalCount: 0} |
| 449 | if !cleanResult.IsClean() { |
| 450 | t.Error("IsClean should return true for empty result") |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | func TestScan_HavingClause(t *testing.T) { |
| 455 | scanner := NewScanner() |
nothing calls this directly
no test coverage detected