Skip to content

Commit 882020f

Browse files
committed
Fix test compilation issue.
1 parent 5987ca9 commit 882020f

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

vector/src/test/java/im/vector/app/core/pushers/PushersManagerTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package im.vector.app.core.pushers
1818

1919
import im.vector.app.R
20+
import im.vector.app.features.mdm.NoOpMdmService
2021
import im.vector.app.test.fakes.FakeActiveSessionHolder
2122
import im.vector.app.test.fakes.FakeAppNameProvider
2223
import im.vector.app.test.fakes.FakeGetDeviceInfoUseCase
@@ -54,6 +55,7 @@ class PushersManagerTest {
5455
stringProvider.instance,
5556
appNameProvider,
5657
getDeviceInfoUseCase,
58+
NoOpMdmService(),
5759
)
5860

5961
@Test
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2023 New Vector Ltd
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package im.vector.app.features.mdm
18+
19+
import android.content.Context
20+
21+
class NoOpMdmService : MdmService {
22+
override fun registerListener(context: Context, onChangedListener: () -> Unit) = Unit
23+
override fun unregisterListener(context: Context) = Unit
24+
override fun getData(mdmData: MdmData): String? = null
25+
}

vector/src/test/java/im/vector/app/features/onboarding/OnboardingViewModelTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import im.vector.app.features.login.LoginMode
2626
import im.vector.app.features.login.ReAuthHelper
2727
import im.vector.app.features.login.ServerType
2828
import im.vector.app.features.login.SignMode
29+
import im.vector.app.features.mdm.NoOpMdmService
2930
import im.vector.app.features.onboarding.RegistrationStateFixture.aRegistrationState
3031
import im.vector.app.features.onboarding.StartAuthenticationFlowUseCase.StartAuthenticationResult
3132
import im.vector.app.test.TestBuildVersionSdkIntProvider
@@ -1121,6 +1122,7 @@ class OnboardingViewModelTest {
11211122
fakeRegistrationActionHandler.instance,
11221123
TestBuildVersionSdkIntProvider().also { it.value = Build.VERSION_CODES.O },
11231124
fakeConfigureAndStartSessionUseCase,
1125+
NoOpMdmService()
11241126
).also {
11251127
viewModel = it
11261128
initialState = state

0 commit comments

Comments
 (0)