...

Source file src/github.com/launchdarkly/go-sdk-events/v2/null_event_processor_test.go

Documentation: github.com/launchdarkly/go-sdk-events/v2

     1  package ldevents
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/launchdarkly/go-sdk-common/v3/ldreason"
     7  	"github.com/launchdarkly/go-sdk-common/v3/ldvalue"
     8  
     9  	"github.com/stretchr/testify/require"
    10  )
    11  
    12  func TestNullEventProcessor(t *testing.T) {
    13  	// Just verifies that these methods don't panic
    14  	n := NewNullEventProcessor()
    15  	n.RecordEvaluation(defaultEventFactory.NewUnknownFlagEvaluationData("x", basicContext(), ldvalue.Null(),
    16  		ldreason.EvaluationReason{}))
    17  	n.RecordIdentifyEvent(defaultEventFactory.NewIdentifyEventData(basicContext()))
    18  	n.RecordCustomEvent(defaultEventFactory.NewCustomEventData("x", basicContext(), ldvalue.Null(), false, 0))
    19  	n.RecordRawEvent([]byte("{}"))
    20  	n.Flush()
    21  	n.FlushBlocking(0)
    22  
    23  	require.NoError(t, n.Close())
    24  }
    25  

View as plain text