aboutsummaryrefslogtreecommitdiff
path: root/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-02-23 20:52:21 -0500
committerGitHub <noreply@github.com>2018-02-23 20:52:21 -0500
commit3d7c85bd97261116a090a7202b0e0ed2625b5d73 (patch)
treef8d6409ef847a1ca0c0ba3640a27984703de470e /core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt
parent20f0d085d6940be30b076a8cff3de25fe4a6e21a (diff)
downloadkau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.tar.gz
kau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.tar.bz2
kau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.zip
Misc (#140)
* Nullify task * Rewrite circle view * Add better encapsulation * Update annotations * Update kpref annotations * Begin writing tests for color picker * Add color selection tests * Update changelog * Cleanup
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.kt16
1 files changed, 8 insertions, 8 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 c2ffa8a..b396985 100644
--- a/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt
+++ b/core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt
@@ -19,10 +19,10 @@ class FaqTest {
fun simpleTest() {
InstrumentationRegistry.getTargetContext().kauParseFaq(R.xml.test_faq) { data ->
assertEquals(2, data.size, "FAQ size is incorrect")
- assertEquals("1. This is a question", data.first().first.toString(), "First question does not match")
- assertEquals("This is an answer", data.first().second.toString(), "First answer does not match")
- assertEquals("2. This is another question", data.last().first.toString(), "Second question does not match")
- assertEquals("This is another answer", data.last().second.toString(), "Second answer does not match")
+ 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")
}
}
@@ -30,10 +30,10 @@ class FaqTest {
fun withoutNumbering() {
InstrumentationRegistry.getTargetContext().kauParseFaq(R.xml.test_faq, false) { data ->
assertEquals(2, data.size, "FAQ size is incorrect")
- assertEquals("This is a question", data.first().first.toString(), "First question does not match")
- assertEquals("This is an answer", data.first().second.toString(), "First answer does not match")
- assertEquals("This is another question", data.last().first.toString(), "Second question does not match")
- assertEquals("This is another answer", data.last().second.toString(), "Second answer does not match")
+ 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")
}
}