Add test for DataNotFoundException

This commit is contained in:
2023-04-06 21:27:51 +02:00
parent 1af34366fc
commit bd473daa6c

View File

@@ -90,9 +90,11 @@ class ConnectionTest : TestAbstract() {
@Test @Test
fun `test call request return nothing`() { fun `test call request return nothing`() {
assertThrows<DataNotFoundException> { val e = assertThrows<DataNotFoundException> {
connection.execute("select * from test where false;", object : TypeReference<ObjTest>() {}) connection.execute("select * from test where false;", object : TypeReference<ObjTest>() {})
} }
assertEquals("No data return for the query", e.message)
assertEquals("select * from test where false;", e.queryExecuted)
} }
@Test @Test