Skip to content

Commit 71ede18

Browse files
authored
Merge pull request #49 from EbenezerGH/write-tests-for-query-utils
Write tests for query utils
2 parents 72a4989 + d0af936 commit 71ede18

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

etherscanapi/src/test/java/jfyg/account/AccountTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import org.junit.Before
1313
import org.junit.Test
1414

1515
class AccountTest {
16-
1716
lateinit var gson: Gson
1817

1918
private val accountBalance = """
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package jfyg.utils
2+
3+
import org.junit.Assert
4+
import org.junit.Test
5+
6+
class QueryUtilsTest {
7+
8+
@Test
9+
fun retrieveAccounts() {
10+
var getAccounts = ""
11+
val accounts = ArrayList<String>()
12+
accounts.add("0x82e4499D4b2A669831a3881d61BB24f7b620c61a")
13+
accounts.add("0x63a9975ba31b0b9626b34300f7f627147df1f526")
14+
accounts.add("0x198ef1ec325a96cc354c7266a038be8b5c558f67")
15+
16+
for (addresses in accounts) {
17+
getAccounts += addresses + ","
18+
}
19+
20+
Assert.assertEquals("0x82e4499D4b2A669831a3881d61BB24f7b620c61a," +
21+
"0x63a9975ba31b0b9626b34300f7f627147df1f526," +
22+
"0x198ef1ec325a96cc354c7266a038be8b5c558f67",
23+
getAccounts.dropLast(1))
24+
}
25+
26+
}

0 commit comments

Comments
 (0)