forked from hunterlong/ethexporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_test.go
49 lines (45 loc) · 985 Bytes
/
main_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
package main
import (
"reflect"
"testing"
)
func TestOpenAddresses(t *testing.T) {
expectedResult := []*Watching{
{
Name: "etherdelta",
Address: "0x8d12A197cB00D4747a1fe03395095ce2A5CC6819",
},
{
Name: "needs-trimming",
Address: "0x647dC1366Da28f8A64EB831fC8E9F05C90d1EA5a",
},
{
Name: "bittrex",
Address: "0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98",
},
{
Name: "poloniex",
Address: "0x32Be343B94f860124dC4fEe278FDCBD38C102D88",
},
{
Name: "kraken",
Address: "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0",
},
{
Name: "duplicated-name",
Address: "0x36Fb6cd260A63719BB7EfC865e1aEaa60922a6d9",
},
{
Name: "duplicated-name",
Address: "0xF6Af0fD6aA7c78EA7038D04F901493f375234f24",
},
}
OpenAddresses("test/data/addresses.txt")
if !reflect.DeepEqual(allWatching, expectedResult) {
t.Errorf(
"unexpected result:\nexpected: %s\nactual: %s",
expectedResult,
allWatching,
)
}
}