Fix test compilation issue.

This commit is contained in:
Benoit Marty 2023-12-04 15:54:17 +01:00
parent 5987ca9c48
commit 882020fdba
3 changed files with 29 additions and 0 deletions

View File

@ -17,6 +17,7 @@
package im.vector.app.core.pushers
import im.vector.app.R
import im.vector.app.features.mdm.NoOpMdmService
import im.vector.app.test.fakes.FakeActiveSessionHolder
import im.vector.app.test.fakes.FakeAppNameProvider
import im.vector.app.test.fakes.FakeGetDeviceInfoUseCase
@ -54,6 +55,7 @@ class PushersManagerTest {
stringProvider.instance,
appNameProvider,
getDeviceInfoUseCase,
NoOpMdmService(),
)
@Test

View File

@ -0,0 +1,25 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.mdm
import android.content.Context
class NoOpMdmService : MdmService {
override fun registerListener(context: Context, onChangedListener: () -> Unit) = Unit
override fun unregisterListener(context: Context) = Unit
override fun getData(mdmData: MdmData): String? = null
}

View File

@ -26,6 +26,7 @@ import im.vector.app.features.login.LoginMode
import im.vector.app.features.login.ReAuthHelper
import im.vector.app.features.login.ServerType
import im.vector.app.features.login.SignMode
import im.vector.app.features.mdm.NoOpMdmService
import im.vector.app.features.onboarding.RegistrationStateFixture.aRegistrationState
import im.vector.app.features.onboarding.StartAuthenticationFlowUseCase.StartAuthenticationResult
import im.vector.app.test.TestBuildVersionSdkIntProvider
@ -1121,6 +1122,7 @@ class OnboardingViewModelTest {
fakeRegistrationActionHandler.instance,
TestBuildVersionSdkIntProvider().also { it.value = Build.VERSION_CODES.O },
fakeConfigureAndStartSessionUseCase,
NoOpMdmService()
).also {
viewModel = it
initialState = state