Move all error-related classes into error package

This commit is contained in:
Stypox 2020-12-09 12:42:01 +01:00
parent 8518933ca8
commit 553b80164b
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
46 changed files with 111 additions and 104 deletions

View file

@ -1,4 +1,4 @@
package org.schabi.newpipe.report;
package org.schabi.newpipe.error;
import android.app.Activity;

View file

@ -1,8 +1,7 @@
package org.schabi.newpipe
package org.schabi.newpipe.error
import org.junit.Assert.assertEquals
import org.junit.Test
import org.schabi.newpipe.ReCaptchaActivity.YT_URL
class ReCaptchaActivityTest {
private fun assertSanitized(expected: String, actual: String?) {
@ -10,9 +9,9 @@ class ReCaptchaActivityTest {
}
@Test fun `null, empty or blank url is sanitized correctly`() {
assertSanitized(YT_URL, null)
assertSanitized(YT_URL, "")
assertSanitized(YT_URL, " \n \t ")
assertSanitized(ReCaptchaActivity.YT_URL, null)
assertSanitized(ReCaptchaActivity.YT_URL, "")
assertSanitized(ReCaptchaActivity.YT_URL, " \n \t ")
}
@Test fun `YouTube url containing pbj=1 is sanitized correctly`() {