(t *testing.T)
| 785 | } |
| 786 | |
| 787 | func TestEnforcerSetDetectors(t *testing.T) { |
| 788 | // Test SetDetectors() method |
| 789 | e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv") |
| 790 | |
| 791 | // Create multiple detectors |
| 792 | detectors := []detector.Detector{ |
| 793 | detector.NewDefaultDetector(), |
| 794 | detector.NewDefaultDetector(), |
| 795 | } |
| 796 | e.SetDetectors(detectors) |
| 797 | |
| 798 | // Should work with multiple detectors |
| 799 | err := e.RunDetections() |
| 800 | if err != nil { |
| 801 | t.Errorf("Expected no error with multiple detectors, but got: %v", err) |
| 802 | } |
| 803 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…