From d850474b0a82ee00d094990d9bd3392ae8cd9575 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 24 Dec 2018 22:00:41 -0500 Subject: Simplify color utils and fix tests, resolves #156 --- .../kotlin/ca/allanwang/kau/xml/FaqTest.kt | 28 +++++----------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'core/src/androidTest/kotlin/ca/allanwang/kau/xml/FaqTest.kt') 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") } } -- cgit v1.2.3