From 0c89245392673ddcf3cf36dd32735798061a2410 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 27 Jan 2023 18:13:27 +0100 Subject: [PATCH] Fix test compilation --- .../java/im/vector/app/features/command/CommandParserTest.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vector/src/test/java/im/vector/app/features/command/CommandParserTest.kt b/vector/src/test/java/im/vector/app/features/command/CommandParserTest.kt index f502db85ca..ef6a99aa49 100644 --- a/vector/src/test/java/im/vector/app/features/command/CommandParserTest.kt +++ b/vector/src/test/java/im/vector/app/features/command/CommandParserTest.kt @@ -16,12 +16,15 @@ package im.vector.app.features.command +import im.vector.app.test.fakes.FakeVectorPreferences import org.amshove.kluent.shouldBeEqualTo import org.junit.Test private const val A_SPACE_ID = "!my-space-id" class CommandParserTest { + private val fakeVectorPreferences = FakeVectorPreferences() + @Test fun parseSlashCommandEmpty() { test("/", ParsedCommand.ErrorEmptySlashCommand) @@ -70,7 +73,7 @@ class CommandParserTest { } private fun test(message: String, expectedResult: ParsedCommand) { - val commandParser = CommandParser() + val commandParser = CommandParser(fakeVectorPreferences.instance) val result = commandParser.parseSlashCommand(message, null, false) result shouldBeEqualTo expectedResult }