From 989ec6efb19394d2f04286ccfb8d5845e4b56206 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 1 Jul 2016 21:55:14 +0200 Subject: [PATCH] Fixed test compile error. --- .../ensichat/core/util/DatabaseTest.scala | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/src/test/scala/com/nutomic/ensichat/core/util/DatabaseTest.scala b/core/src/test/scala/com/nutomic/ensichat/core/util/DatabaseTest.scala index d57237c..35d2e4e 100644 --- a/core/src/test/scala/com/nutomic/ensichat/core/util/DatabaseTest.scala +++ b/core/src/test/scala/com/nutomic/ensichat/core/util/DatabaseTest.scala @@ -6,7 +6,7 @@ import java.util.concurrent.CountDownLatch import com.nutomic.ensichat.core.body.Text import com.nutomic.ensichat.core.header.ContentHeader -import com.nutomic.ensichat.core.interfaces.CallbackInterface +import com.nutomic.ensichat.core.interfaces.{SettingsInterface, CallbackInterface} import com.nutomic.ensichat.core.util.DatabaseTest._ import com.nutomic.ensichat.core.{Address, Message, User} import junit.framework.Assert._ @@ -42,15 +42,16 @@ class DatabaseTest extends TestCase { private val latch = new CountDownLatch(1) - private val database = new Database(databaseFile, new CallbackInterface { - override def onConnectionsChanged(): Unit = {} - - override def onContactsUpdated(): Unit = { - latch.countDown() - } - - override def onMessageReceived(msg: Message): Unit = {} - }) + private val database = new Database(databaseFile, new SettingsInterface { + override def get[T](key: String, default: T): T = default + override def put[T](key: String, value: T): Unit = {} + }, new CallbackInterface { + override def onConnectionsChanged(): Unit = {} + override def onContactsUpdated(): Unit = { + latch.countDown() + } + override def onMessageReceived(msg: Message): Unit = {} + }) override def tearDown(): Unit = { super.tearDown()