diff options
author | Allan Wang <me@allanwang.ca> | 2018-12-24 22:00:41 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-12-24 22:00:41 -0500 |
commit | d850474b0a82ee00d094990d9bd3392ae8cd9575 (patch) | |
tree | e5bdf272058d345871d615480764468fc95702d7 /core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt | |
parent | 84174b8f5bdb0107bee48e0b2b8613a9015eb36e (diff) | |
download | kau-d850474b0a82ee00d094990d9bd3392ae8cd9575.tar.gz kau-d850474b0a82ee00d094990d9bd3392ae8cd9575.tar.bz2 kau-d850474b0a82ee00d094990d9bd3392ae8cd9575.zip |
Simplify color utils and fix tests, resolves #156
Diffstat (limited to 'core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt')
-rw-r--r-- | core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt b/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt index 2d02dbc..7ec2a41 100644 --- a/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt +++ b/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt @@ -36,27 +36,11 @@ class FaqTest { @Test fun simpleTest() { - context.kauParseFaq(R.xml.test_faq) { data -> - assertEquals(2, data.size, "FAQ size is incorrect") - assertEquals("1. This is a question", data.first().question.toString(), "First question does not match") - assertEquals("This is an answer", data.first().answer.toString(), "First answer does not match") - assertEquals( - "2. This is another question", - data.last().question.toString(), - "Second question does not match" - ) - assertEquals("This is another answer", data.last().answer.toString(), "Second answer does not match") - } - } - - @Test - fun withoutNumbering() { - context.kauParseFaq(R.xml.test_faq, false) { data -> - assertEquals(2, data.size, "FAQ size is incorrect") - assertEquals("This is a question", data.first().question.toString(), "First question does not match") - assertEquals("This is an answer", data.first().answer.toString(), "First answer does not match") - assertEquals("This is another question", data.last().question.toString(), "Second question does not match") - assertEquals("This is another answer", data.last().answer.toString(), "Second answer does not match") - } + val data = context.kauParseFaq(R.xml.test_faq, false) + assertEquals(2, data.size, "FAQ size is incorrect") + assertEquals("This is a question", data.first().question.toString(), "First question does not match") + assertEquals("This is an answer", data.first().answer.toString(), "First answer does not match") + assertEquals("This is another question", data.last().question.toString(), "Second question does not match") + assertEquals("This is another answer", data.last().answer.toString(), "Second answer does not match") } } |