From a1bdfd1a5c00493ff4f0d9c0b8ff7748ffd3381b Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Tue, 13 Sep 2022 14:43:23 +0200 Subject: [PATCH] Using shouldBeNull() method in unit tests --- .../devices/v2/overview/GetDeviceFullInfoUseCaseTest.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCaseTest.kt b/vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCaseTest.kt index 2001d2ba37..9c7515f2da 100644 --- a/vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCaseTest.kt +++ b/vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCaseTest.kt @@ -34,6 +34,7 @@ import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.runTest import org.amshove.kluent.shouldBeEqualTo +import org.amshove.kluent.shouldBeNull import org.junit.After import org.junit.Before import org.junit.Test @@ -117,7 +118,7 @@ class GetDeviceFullInfoUseCaseTest { val deviceFullInfo = getDeviceFullInfoUseCase.execute(A_DEVICE_ID).firstOrNull() // Then - deviceFullInfo shouldBeEqualTo null + deviceFullInfo.shouldBeNull() verify { fakeActiveSessionHolder.instance.getSafeActiveSession() } verify { fakeActiveSessionHolder.fakeSession.fakeCryptoService.getMyDevicesInfoLive(A_DEVICE_ID).asFlow() } verify { fakeActiveSessionHolder.fakeSession.fakeCryptoService.getLiveCryptoDeviceInfoWithId(A_DEVICE_ID).asFlow() } @@ -132,7 +133,7 @@ class GetDeviceFullInfoUseCaseTest { val deviceFullInfo = getDeviceFullInfoUseCase.execute(A_DEVICE_ID).firstOrNull() // Then - deviceFullInfo shouldBeEqualTo null + deviceFullInfo.shouldBeNull() verify { fakeActiveSessionHolder.instance.getSafeActiveSession() } }