2016-02-28 02:52:20 +00:00
|
|
|
package goricochet
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestOpenChatChannel(t *testing.T) {
|
|
|
|
messageBuilder := new(MessageBuilder)
|
2016-06-27 01:56:23 +00:00
|
|
|
_, err := messageBuilder.OpenChannel(1, "im.ricochet.chat")
|
2016-02-28 02:52:20 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error building open chat channel message: %s", err)
|
|
|
|
}
|
|
|
|
// TODO: More Indepth Test Of Output
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestOpenContactRequestChannel(t *testing.T) {
|
|
|
|
messageBuilder := new(MessageBuilder)
|
2016-02-28 03:26:43 +00:00
|
|
|
_, err := messageBuilder.OpenContactRequestChannel(3, "Nickname", "Message")
|
2016-02-28 02:52:20 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error building open contact request channel message: %s", err)
|
|
|
|
}
|
|
|
|
// TODO: More Indepth Test Of Output
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestOpenAuthenticationChannel(t *testing.T) {
|
|
|
|
messageBuilder := new(MessageBuilder)
|
2016-02-28 03:26:43 +00:00
|
|
|
_, err := messageBuilder.OpenAuthenticationChannel(1, [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
|
2016-02-28 02:52:20 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error building open authentication channel message: %s", err)
|
|
|
|
}
|
|
|
|
// TODO: More Indepth Test Of Output
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestChatMessage(t *testing.T) {
|
|
|
|
messageBuilder := new(MessageBuilder)
|
2016-06-27 01:56:23 +00:00
|
|
|
_, err := messageBuilder.ChatMessage("Hello World", 0)
|
2016-02-28 02:52:20 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error building chat message: %s", err)
|
|
|
|
}
|
|
|
|
// TODO: More Indepth Test Of Output
|
|
|
|
}
|