2019-11-18 16:22:08 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
2020-02-14 09:14:19 +00:00
|
|
|
func TestRequestMetaHeader_SetEpoch(t *testing.T) {
|
|
|
|
m := new(ResponseMetaHeader)
|
|
|
|
epoch := uint64(3)
|
|
|
|
m.SetEpoch(epoch)
|
|
|
|
require.Equal(t, epoch, m.GetEpoch())
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestRequestMetaHeader_SetVersion(t *testing.T) {
|
|
|
|
m := new(ResponseMetaHeader)
|
|
|
|
version := uint32(3)
|
|
|
|
m.SetVersion(version)
|
|
|
|
require.Equal(t, version, m.GetVersion())
|
|
|
|
}
|
2020-04-28 12:39:09 +00:00
|
|
|
|
|
|
|
func TestRequestMetaHeader_SetRaw(t *testing.T) {
|
|
|
|
m := new(RequestMetaHeader)
|
|
|
|
|
|
|
|
m.SetRaw(true)
|
|
|
|
require.True(t, m.GetRaw())
|
|
|
|
|
|
|
|
m.SetRaw(false)
|
|
|
|
require.False(t, m.GetRaw())
|
|
|
|
}
|