goadb/adb/adb_test.go
2024-06-11 21:25:58 +05:00

23 lines
387 B
Go

package adb
import (
"testing"
"github.com/timoxa0/goadb/wire"
"github.com/stretchr/testify/assert"
)
func TestGetServerVersion(t *testing.T) {
s := &MockServer{
Status: wire.StatusSuccess,
Messages: []string{"000a"},
}
client := &Adb{s}
v, err := client.ServerVersion()
assert.Equal(t, "host:version", s.Requests[0])
assert.NoError(t, err)
assert.Equal(t, 10, v)
}