diff options
Diffstat (limited to 'src/test/groovy')
-rw-r--r-- | src/test/groovy/org/xapek/yvesf/classifieds/UnitTest.groovy | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/groovy/org/xapek/yvesf/classifieds/UnitTest.groovy b/src/test/groovy/org/xapek/yvesf/classifieds/UnitTest.groovy index 7c477b4..6d6f764 100644 --- a/src/test/groovy/org/xapek/yvesf/classifieds/UnitTest.groovy +++ b/src/test/groovy/org/xapek/yvesf/classifieds/UnitTest.groovy @@ -1,8 +1,10 @@ package org.xapek.yvesf.classifieds +import groovy.transform.CompileStatic import org.junit.Test import org.xapek.yvesf.classifieds.util.Success +@CompileStatic class UnitTest { @Test void testRead() { @@ -15,7 +17,6 @@ class UnitTest { final data = Main.handleData(Main.readInputStream(UnitTest.getResourceAsStream('test.json'))) assert data instanceof Success assert data.success - assert !data.error assert data.value instanceof Model.ClassifiedsList assert data.value.totalCount > 0 assert data.value.size() > 0 @@ -36,7 +37,14 @@ class UnitTest { 'title' : 'value=title', 'id' : 'value=id', 'mem_name' : 'value=mem_name', + 'mem_id' : '0', 'description': 'value=description', + 'photo1' : 'asd', + 'photo2' : 0, + 'photo3' : 0, + 'photo4' : 0, + 'date' : 'Apr 01, 99', + 'rooms' : '1', ])) Dumper.dump(list, new PrintWriter(os)) final output = os.toString() @@ -44,4 +52,4 @@ class UnitTest { assert output.contains("value=title") assert output.contains("value=description") } -}
\ No newline at end of file +} |