this is a test gist
fun someFunc() {
}
this is a test gist
fun someFunc() {
}
| #!/bin/sh | |
| echo "Running static analysis (ktlintcheck)..." | |
| ./gradlew ktlintcheck --daemon | |
| status=$? | |
| if [ "$status" = 0 ] ; then | |
| echo "Static analysis found no errors." |
| @JsonClass(generateAdapter = true) | |
| data class Complaint ( | |
| val id: String, | |
| val description: String, | |
| val createdAt: Long, | |
| val owner: Owner | |
| ) | |
| @JsonClass(generateAdapter = true) | |
| data class Owner ( |
| @Test | |
| fun loadData () { | |
| val moshi = Moshi.Builder().build() | |
| val listType = Types.newParameterizedType(List::class.java, Complaint::class.java) | |
| val source = Okio.buffer(Okio.source(inputStream("/gov_complaints.json"))) | |
| val complaints = moshi.adapter<List<Complaint>>(listType).fromJson(source) | |
| Assert.assertNotNull(complaints) | |
| Assert.assertEquals(complaints!!.isEmpty(), false) |