Wrong class type will only test with min Android Q

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-02-13 16:40:30 +01:00 committed by Alper Öztürk
parent 43ec7f9e69
commit aa6ca04c0c
2 changed files with 6 additions and 0 deletions

View file

@ -21,8 +21,10 @@
package com.nextcloud.extensions
import android.os.Build
import android.os.Bundle
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SdkSuppress
import com.nextcloud.test.model.OtherTestData
import com.nextcloud.test.model.TestData
import com.nextcloud.test.model.TestDataParcelable
@ -48,6 +50,7 @@ class BundleExtensionTests {
assertEquals(testObject, retrievedObject)
}
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
@Test
fun test_get_serializable_argument_when_given_valid_bundle_and_wrong_class_type_should_return_null() {
val bundle = Bundle()

View file

@ -22,7 +22,9 @@
package com.nextcloud.extensions
import android.content.Intent
import android.os.Build
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SdkSuppress
import com.nextcloud.test.model.OtherTestData
import com.nextcloud.test.model.TestData
import com.nextcloud.test.model.TestDataParcelable
@ -48,6 +50,7 @@ class IntentExtensionTests {
assertEquals(testObject, retrievedObject)
}
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
@Test
fun test_get_serializable_argument_when_given_valid_intent_and_wrong_class_type_should_return_null() {
val intent = Intent()