-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgopiano_test.go
82 lines (71 loc) · 1.58 KB
/
gopiano_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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package gopiano
import "testing"
var client *Client
func Test_Setup(t *testing.T) {
client, _ = NewClient(AndroidClient)
}
func Test_Encrypt_1(t *testing.T) {
testString := "foobar"
expected := "3c739d4e29b5d6c6"
encrypted := client.encrypt(testString)
if encrypted != expected {
t.Error("encrypt failed.")
} else {
t.Log("encrypt passed")
}
}
func Test_Decrypt_1(t *testing.T) {
expected := "foobar"
testString := "95b6027f2d427dc0"
decrypted, err := client.decrypt(testString)
if err != nil {
t.Error(err)
}
if decrypted != expected {
t.Error("decrypt failed.")
} else {
t.Log("decrypt passed")
}
}
func Test_AuthPartnerLogin_1(t *testing.T) {
response, err := client.AuthPartnerLogin()
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}
func Test_AuthUserLogin_1(t *testing.T) {
response, err := client.AuthUserLogin("mellowcellofellow@gmail.com", "Great8")
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}
func Test_UserCanSubscribe_1(t *testing.T) {
response, err := client.UserCanSubscribe()
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}
func Test_UserBetBookmarks_1(t *testing.T) {
response, err := client.UserGetBookmarks()
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}
func Test_UserGetStationList_1(t *testing.T) {
response, err := client.UserGetStationList(true)
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}
func Test_UserGetStationListChecksum_1(t *testing.T) {
response, err := client.UserGetStationListChecksum()
if err != nil {
t.Error(err)
}
t.Logf("%+v\n", response)
}