Skip to content

Commit dded4c7

Browse files
author
许锐
committed
add issue195 test class
1 parent aa86d2a commit dded4c7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package wu.seal.jsontokotlin.regression
2+
3+
import com.winterbe.expekt.should
4+
import org.junit.Before
5+
import org.junit.Test
6+
import wu.seal.jsontokotlin.KotlinDataClassCodeMaker
7+
import wu.seal.jsontokotlin.test.TestConfig
8+
9+
class Issue195Test {
10+
11+
private val expected = """data class A(
12+
@SerializedName("xxx")
13+
val xxx: List<List<Any>> = listOf()
14+
)"""
15+
16+
/**
17+
* init test environment before test
18+
*/
19+
@Before
20+
fun setUp() {
21+
TestConfig.setToTestInitState()
22+
}
23+
24+
/**
25+
* test issue #130 of Github Project issue
26+
*/
27+
@Test
28+
fun testIssue195() {
29+
val generated = KotlinDataClassCodeMaker("A", "{\"xxx\":[[]]}").makeKotlinDataClassCode()
30+
generated.trim().should.be.equal(expected)
31+
}
32+
}

0 commit comments

Comments
 (0)