mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
18 lines
322 B
Go
18 lines
322 B
Go
package binance
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func Test_newClientOrderID(t *testing.T) {
|
|
cID := newSpotClientOrderID("")
|
|
assert.Len(t, cID, 32)
|
|
strings.HasPrefix(cID, "x-"+spotBrokerID)
|
|
|
|
cID = newSpotClientOrderID("myid1")
|
|
assert.Equal(t, cID, "x-"+spotBrokerID+"myid1")
|
|
}
|