-
Notifications
You must be signed in to change notification settings - Fork 26
/
options_test.go
57 lines (46 loc) · 1.19 KB
/
options_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package echotron
import (
"reflect"
"testing"
)
var (
msgIDOpts = MessageIDOptions{
chatID: 1,
messageID: 2,
}
inlineMsgIDOpts = MessageIDOptions{
inlineMessageID: "inline",
}
)
func TestNewMessageID(t *testing.T) {
new := NewMessageID(1, 2)
if !reflect.DeepEqual(new, msgIDOpts) {
t.Logf("expected MessageIDOptions: %+v", msgIDOpts)
t.Logf("got MessageIDOptions: %+v", new)
t.Fatal("error: MessageIDOptions mismatch")
}
}
func TestNewInlineMessageID(t *testing.T) {
new := NewInlineMessageID("inline")
if !reflect.DeepEqual(new, inlineMsgIDOpts) {
t.Logf("expected MessageIDOptions: %+v", inlineMsgIDOpts)
t.Logf("got MessageIDOptions: %+v", new)
t.Fatal("error: MessageIDOptions mismatch")
}
}
func TestReplyKeyboardMarkupImplementsReplyMarkup(_ *testing.T) {
i := ReplyKeyboardMarkup{}
i.ImplementsReplyMarkup()
}
func TestReplyKeyboardRemoveImplementsReplyMarkup(_ *testing.T) {
i := ReplyKeyboardRemove{}
i.ImplementsReplyMarkup()
}
func TestInlineKeyboardMarkupImplementsReplyMarkup(_ *testing.T) {
i := InlineKeyboardMarkup{}
i.ImplementsReplyMarkup()
}
func TestForceReplyImplementsReplyMarkup(_ *testing.T) {
i := ForceReply{}
i.ImplementsReplyMarkup()
}