|
1 | 1 | package org.schabi.newpipe.extractor.services.youtube.search; |
2 | 2 |
|
| 3 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
| 4 | +import static org.junit.jupiter.api.Assertions.assertFalse; |
| 5 | +import static org.junit.jupiter.api.Assertions.assertNotNull; |
| 6 | +import static org.junit.jupiter.api.Assertions.assertTrue; |
| 7 | +import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEmptyErrors; |
| 8 | +import static org.schabi.newpipe.extractor.ServiceList.YouTube; |
| 9 | +import static org.schabi.newpipe.extractor.services.DefaultTests.assertNoDuplicatedItems; |
| 10 | +import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.CHANNELS; |
| 11 | +import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.PLAYLISTS; |
| 12 | +import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.VIDEOS; |
| 13 | +import static java.util.Collections.singletonList; |
| 14 | + |
3 | 15 | import org.junit.jupiter.api.BeforeAll; |
4 | | -import org.junit.jupiter.api.Disabled; |
5 | 16 | import org.junit.jupiter.api.Test; |
6 | 17 | import org.schabi.newpipe.downloader.DownloaderFactory; |
7 | | -import org.schabi.newpipe.extractor.*; |
| 18 | +import org.schabi.newpipe.downloader.MockOnly; |
| 19 | +import org.schabi.newpipe.extractor.InfoItem; |
| 20 | +import org.schabi.newpipe.extractor.ListExtractor; |
| 21 | +import org.schabi.newpipe.extractor.MetaInfo; |
| 22 | +import org.schabi.newpipe.extractor.NewPipe; |
| 23 | +import org.schabi.newpipe.extractor.StreamingService; |
8 | 24 | import org.schabi.newpipe.extractor.channel.ChannelInfoItem; |
9 | 25 | import org.schabi.newpipe.extractor.exceptions.ExtractionException; |
10 | 26 | import org.schabi.newpipe.extractor.search.SearchExtractor; |
|
13 | 29 | import org.schabi.newpipe.extractor.stream.Description; |
14 | 30 | import org.schabi.newpipe.extractor.stream.StreamInfoItem; |
15 | 31 |
|
16 | | -import javax.annotation.Nullable; |
17 | 32 | import java.io.IOException; |
18 | 33 | import java.net.MalformedURLException; |
19 | 34 | import java.net.URL; |
|
22 | 37 | import java.util.List; |
23 | 38 | import java.util.Random; |
24 | 39 |
|
25 | | -import static java.util.Collections.singletonList; |
26 | | -import static org.junit.jupiter.api.Assertions.assertFalse; |
27 | | -import static org.junit.jupiter.api.Assertions.*; |
28 | | -import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEmptyErrors; |
29 | | -import static org.schabi.newpipe.extractor.ServiceList.YouTube; |
30 | | -import static org.schabi.newpipe.extractor.services.DefaultTests.assertNoDuplicatedItems; |
31 | | -import static org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.*; |
| 40 | +import javax.annotation.Nullable; |
32 | 41 |
|
33 | 42 | public class YoutubeSearchExtractorTest { |
34 | 43 |
|
@@ -132,7 +141,7 @@ public static void setUp() throws Exception { |
132 | 141 | @Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; } |
133 | 142 | } |
134 | 143 |
|
135 | | - @Disabled("Currently constantly switching between \"Did you mean\" and \"Showing results for ...\" occurs") |
| 144 | + @MockOnly("Currently constantly switching between \"Did you mean\" and \"Showing results for ...\" occurs") |
136 | 145 | public static class Suggestion extends DefaultSearchExtractorTest { |
137 | 146 | private static SearchExtractor extractor; |
138 | 147 | private static final String QUERY = "newpip"; |
|
0 commit comments