2020-07-08 04:31:22 +00:00
|
|
|
package stream
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEvent_IsEndOfSnapshot(t *testing.T) {
|
|
|
|
e := Event{Payload: endOfSnapshot{}}
|
|
|
|
require.True(t, e.IsEndOfSnapshot())
|
|
|
|
|
|
|
|
t.Run("not EndOfSnapshot", func(t *testing.T) {
|
2020-10-01 17:51:55 +00:00
|
|
|
e := Event{Payload: newSnapshotToFollow{}}
|
2020-07-08 04:31:22 +00:00
|
|
|
require.False(t, e.IsEndOfSnapshot())
|
|
|
|
})
|
|
|
|
}
|