From 0d75273121647a0ed4cfae9e65e814ad8ad06b66 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Mon, 7 Mar 2022 12:22:25 +0100 Subject: [PATCH] Adds stubbing and verification for migration setRequired --- .../fakes/internal/auth/db/migration/Fake005MigrationRealm.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/internal/auth/db/migration/Fake005MigrationRealm.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/internal/auth/db/migration/Fake005MigrationRealm.kt index 434b937ad8..147f8df969 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/internal/auth/db/migration/Fake005MigrationRealm.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/internal/auth/db/migration/Fake005MigrationRealm.kt @@ -35,6 +35,7 @@ class Fake005MigrationRealm { every { instance.schema } returns schema every { schema.get("SessionParamsEntity") } returns objectSchema every { objectSchema.addField(any(), any()) } returns objectSchema + every { objectSchema.setRequired(any(), any()) } returns objectSchema every { objectSchema.transform(any()) } returns objectSchema } @@ -46,6 +47,7 @@ class Fake005MigrationRealm { verifyOrder { objectSchema["SessionParamsEntity"] objectSchema.addField(SessionParamsEntityFields.LOGIN_TYPE, String::class.java) + objectSchema.setRequired(SessionParamsEntityFields.LOGIN_TYPE, true) objectSchema.transform(any()) } }