2014-02-09 18:40:51 +01:00
|
|
|
package goSam
|
|
|
|
|
2014-02-10 19:27:24 +01:00
|
|
|
import "testing"
|
2014-02-09 18:40:51 +01:00
|
|
|
|
|
|
|
var (
|
|
|
|
client *Client
|
|
|
|
)
|
|
|
|
|
|
|
|
func setup() {
|
|
|
|
var err error
|
|
|
|
|
|
|
|
// these tests expect a running SAM brige on this address
|
2014-02-10 19:27:24 +01:00
|
|
|
client, err = NewDefaultClient()
|
2014-02-09 18:40:51 +01:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func teardown() {
|
|
|
|
client.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestClientHello(t *testing.T) {
|
|
|
|
var err error
|
|
|
|
|
2014-02-11 13:10:24 +01:00
|
|
|
client, err = NewDefaultClient()
|
2014-02-09 18:40:51 +01:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("client.Hello() should not throw an error.\n%s\n", err)
|
|
|
|
}
|
2014-02-11 13:10:24 +01:00
|
|
|
|
|
|
|
client.Close()
|
2014-02-09 18:40:51 +01:00
|
|
|
}
|