Fix ErrorInfoTest after changes to exception classifications

This commit is contained in:
Stypox
2026-02-02 19:54:55 +01:00
parent abf9a80715
commit f63ea4aa93
@@ -9,7 +9,6 @@ import androidx.test.filters.LargeTest
import java.io.IOException import java.io.IOException
import java.net.SocketTimeoutException import java.net.SocketTimeoutException
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Test import org.junit.Test
@@ -25,7 +24,7 @@ import org.schabi.newpipe.extractor.exceptions.ReCaptchaException
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@LargeTest @LargeTest
class ErrorInfoTest { class ErrorInfoTest {
private val context: Context by lazy { ApplicationProvider.getApplicationContext<Context>() } private val context: Context by lazy { ApplicationProvider.getApplicationContext() }
/** /**
* @param errorInfo the error info to access * @param errorInfo the error info to access
@@ -122,7 +121,7 @@ class ErrorInfoTest {
) )
assertEquals(context.getString(R.string.recaptcha_request_toast), errorInfo.getMessage(context)) assertEquals(context.getString(R.string.recaptcha_request_toast), errorInfo.getMessage(context))
assertEquals(url, errorInfo.recaptchaUrl) assertEquals(url, errorInfo.recaptchaUrl)
assertFalse(errorInfo.isReportable) assertTrue(errorInfo.isReportable)
assertTrue(errorInfo.isRetryable) assertTrue(errorInfo.isRetryable)
} }
} }