mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-10-04 06:41:48 +00:00
Fix ErrorInfoTest after changes to exception classifications
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user