forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathempty_plan_test.go
21 lines (17 loc) · 1 KB
/
empty_plan_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package hooks
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestEmptyPlanBuilder(t *testing.T) {
planBuilder := EmptyPlanBuilder{}
endpoint := "/openrtb2/auction"
message := "Empty plan builder should always return empty hook execution plan for %s stage."
assert.Len(t, planBuilder.PlanForEntrypointStage(endpoint), 0, message, StageEntrypoint)
assert.Len(t, planBuilder.PlanForRawAuctionStage(endpoint, nil), 0, message, StageRawAuctionRequest)
assert.Len(t, planBuilder.PlanForProcessedAuctionStage(endpoint, nil), 0, message, StageProcessedAuctionRequest)
assert.Len(t, planBuilder.PlanForBidderRequestStage(endpoint, nil), 0, message, StageBidderRequest)
assert.Len(t, planBuilder.PlanForRawBidderResponseStage(endpoint, nil), 0, message, StageRawBidderResponse)
assert.Len(t, planBuilder.PlanForAllProcessedBidResponsesStage(endpoint, nil), 0, message, StageAllProcessedBidResponses)
assert.Len(t, planBuilder.PlanForAuctionResponseStage(endpoint, nil), 0, message, StageAuctionResponse)
}