Add tabs and tags methods in tests interfaces and annotate all methods with the Test JUnit annotation

These changes should help to detect tests as tests, when running a subset of
tests or all tests.
They should be also implemented in these interfaces' implementations (new and
existing ones).

Co-authored-by: ThetaDev <t.testboy@gmail.com>
This commit is contained in:
AudricV 2023-07-15 00:16:58 +02:00 committed by Stypox
parent c70a0e3543
commit 18846baba7
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
6 changed files with 71 additions and 6 deletions

View File

@ -1,11 +1,22 @@
package org.schabi.newpipe.extractor.services;
@SuppressWarnings("unused")
public interface BaseChannelExtractorTest extends BaseListExtractorTest {
import org.junit.jupiter.api.Test;
public interface BaseChannelExtractorTest extends BaseExtractorTest {
@Test
void testDescription() throws Exception;
@Test
void testAvatarUrl() throws Exception;
@Test
void testBannerUrl() throws Exception;
@Test
void testFeedUrl() throws Exception;
@Test
void testSubscriberCount() throws Exception;
@Test
void testVerified() throws Exception;
@Test
void testTabs() throws Exception;
@Test
void testTags() throws Exception;
}

View File

@ -1,10 +1,16 @@
package org.schabi.newpipe.extractor.services;
@SuppressWarnings("unused")
import org.junit.jupiter.api.Test;
public interface BaseExtractorTest {
@Test
void testServiceId() throws Exception;
@Test
void testName() throws Exception;
@Test
void testId() throws Exception;
@Test
void testUrl() throws Exception;
@Test
void testOriginalUrl() throws Exception;
}

View File

@ -1,7 +1,10 @@
package org.schabi.newpipe.extractor.services;
@SuppressWarnings("unused")
import org.junit.jupiter.api.Test;
public interface BaseListExtractorTest extends BaseExtractorTest {
@Test
void testRelatedItems() throws Exception;
@Test
void testMoreRelatedItems() throws Exception;
}

View File

@ -1,11 +1,18 @@
package org.schabi.newpipe.extractor.services;
@SuppressWarnings("unused")
import org.junit.jupiter.api.Test;
public interface BasePlaylistExtractorTest extends BaseListExtractorTest {
@Test
void testThumbnailUrl() throws Exception;
@Test
void testBannerUrl() throws Exception;
@Test
void testUploaderName() throws Exception;
@Test
void testUploaderAvatarUrl() throws Exception;
@Test
void testStreamCount() throws Exception;
@Test
void testUploaderVerified() throws Exception;
}

View File

@ -1,8 +1,12 @@
package org.schabi.newpipe.extractor.services;
@SuppressWarnings("unused")
import org.junit.jupiter.api.Test;
public interface BaseSearchExtractorTest extends BaseListExtractorTest {
@Test
void testSearchString() throws Exception;
@Test
void testSearchSuggestion() throws Exception;
@Test
void testSearchCorrected() throws Exception;
}

View File

@ -1,36 +1,70 @@
package org.schabi.newpipe.extractor.services;
import org.junit.jupiter.api.Test;
public interface BaseStreamExtractorTest extends BaseExtractorTest {
@Test
void testStreamType() throws Exception;
@Test
void testUploaderName() throws Exception;
@Test
void testUploaderUrl() throws Exception;
@Test
void testUploaderAvatarUrl() throws Exception;
@Test
void testSubscriberCount() throws Exception;
@Test
void testSubChannelName() throws Exception;
@Test
void testSubChannelUrl() throws Exception;
@Test
void testSubChannelAvatarUrl() throws Exception;
@Test
void testThumbnailUrl() throws Exception;
@Test
void testDescription() throws Exception;
@Test
void testLength() throws Exception;
@Test
void testTimestamp() throws Exception;
@Test
void testViewCount() throws Exception;
@Test
void testUploadDate() throws Exception;
@Test
void testTextualUploadDate() throws Exception;
@Test
void testLikeCount() throws Exception;
@Test
void testDislikeCount() throws Exception;
@Test
void testRelatedItems() throws Exception;
@Test
void testAgeLimit() throws Exception;
@Test
void testErrorMessage() throws Exception;
@Test
void testAudioStreams() throws Exception;
@Test
void testVideoStreams() throws Exception;
@Test
void testSubtitles() throws Exception;
@Test
void testGetDashMpdUrl() throws Exception;
@Test
void testFrames() throws Exception;
@Test
void testHost() throws Exception;
@Test
void testPrivacy() throws Exception;
@Test
void testCategory() throws Exception;
@Test
void testLicence() throws Exception;
@Test
void testLanguageInfo() throws Exception;
@Test
void testTags() throws Exception;
@Test
void testSupportInfo() throws Exception;
}