adding quickfix library
This commit is contained in:
26
quickfix/datadictionary/field_def_test.go
Normal file
26
quickfix/datadictionary/field_def_test.go
Normal file
@ -0,0 +1,26 @@
|
||||
package datadictionary_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/quickfixgo/quickfix/datadictionary"
|
||||
)
|
||||
|
||||
func TestNewFieldDef(t *testing.T) {
|
||||
ft := datadictionary.NewFieldType("aname", 11, "INT")
|
||||
|
||||
var tests = []struct {
|
||||
required bool
|
||||
}{
|
||||
{false},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
fd := datadictionary.NewFieldDef(ft, test.required)
|
||||
assert.False(t, fd.IsGroup(), "field def is not a group")
|
||||
assert.Equal(t, "aname", fd.Name())
|
||||
assert.Equal(t, test.required, fd.Required())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user