service: refactor MetaHeader interface

This commit is contained in:
Leonard Lyubich 2020-05-04 14:37:14 +03:00
parent c38a8eddc8
commit eb94cf7549
11 changed files with 131 additions and 62 deletions

21
service/version_test.go Normal file
View file

@ -0,0 +1,21 @@
package service
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestGetSetVersion(t *testing.T) {
v := uint32(7)
items := []VersionContainer{
new(ResponseMetaHeader),
new(RequestMetaHeader),
}
for _, item := range items {
item.SetVersion(v)
require.Equal(t, v, item.GetVersion())
}
}