1 Star 0 Fork 75

lstarby / yomo

forked from YoMo / yomo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
source_test.go 410 Bytes
一键复制 编辑 原始数据 按行查看 历史
package yomo
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSourceSendDataToServer(t *testing.T) {
source := NewSource("test-source")
defer source.Close()
// connect to server
err := source.Connect()
assert.Nil(t, err)
// send data to server
n, err := source.Write([]byte("test"))
assert.Greater(t, n, 0, "[source.Write] expected n > 0, but got %d", n)
assert.Nil(t, err)
}
Go
1
https://gitee.com/lstarby/yomo.git
git@gitee.com:lstarby/yomo.git
lstarby
yomo
yomo
master

搜索帮助