Fix tests

This commit is contained in:
Benoit Marty 2025-08-07 12:19:26 +02:00
parent 2a4fc974ea
commit a8ba4751ed
3 changed files with 52 additions and 37 deletions

View file

@ -0,0 +1,26 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.libraries.matrix.test.tracing
import io.element.android.libraries.matrix.api.tracing.TracingService
import io.element.android.libraries.matrix.api.tracing.WriteToFilesConfiguration
import io.element.android.tests.testutils.lambda.lambdaError
import timber.log.Timber
class FakeTracingService(
private val createTimberTreeResult: (String) -> Timber.Tree = { lambdaError() },
private val updateWriteToFilesConfigurationResult: (WriteToFilesConfiguration) -> Unit = { lambdaError() }
) : TracingService {
override fun createTimberTree(target: String): Timber.Tree {
return createTimberTreeResult(target)
}
override fun updateWriteToFilesConfiguration(config: WriteToFilesConfiguration) {
updateWriteToFilesConfigurationResult(config)
}
}