32 lines
513 B
Go
32 lines
513 B
Go
|
package data
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
// TODO: Import from urdt/ussd
|
||
|
func TestEncodeKey(t *testing.T) {
|
||
|
type args struct {
|
||
|
sessionID string
|
||
|
dataType uint16
|
||
|
}
|
||
|
tests := []struct {
|
||
|
name string
|
||
|
args args
|
||
|
}{
|
||
|
{
|
||
|
"blockchain_address",
|
||
|
args{
|
||
|
sessionID: "+254711000123",
|
||
|
dataType: ACCOUNT_BLOCKCHAIN_ADDRESS,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
for _, tt := range tests {
|
||
|
t.Run(tt.name, func(t *testing.T) {
|
||
|
got := EncodeKey(tt.args.sessionID, tt.args.dataType)
|
||
|
t.Logf("%s key: %x", tt.name, got)
|
||
|
})
|
||
|
}
|
||
|
}
|