Skip to content

Commit 913243e

Browse files
litetexStypox
authored andcommitted
Fixed BandcampSearchExtractorTest
Also removed the unnecessary ``public``
1 parent 5503d16 commit 913243e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampSearchExtractorTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void setUp() {
3636
* the accordingly named song by Zach Benson
3737
*/
3838
@Test
39-
public void testStreamSearch() throws ExtractionException, IOException {
39+
void testStreamSearch() throws ExtractionException, IOException {
4040
final SearchExtractor extractor = Bandcamp.getSearchExtractor("best friend's basement");
4141

4242
final ListExtractor.InfoItemsPage<InfoItem> page = extractor.getInitialPage();
@@ -54,7 +54,7 @@ public void testStreamSearch() throws ExtractionException, IOException {
5454
* Tests whether searching bandcamp for "C418" returns the artist's profile
5555
*/
5656
@Test
57-
public void testChannelSearch() throws ExtractionException, IOException {
57+
void testChannelSearch() throws ExtractionException, IOException {
5858
final SearchExtractor extractor = Bandcamp.getSearchExtractor("C418");
5959
final InfoItem c418 = extractor.getInitialPage()
6060
.getItems().get(0);
@@ -71,27 +71,29 @@ public void testChannelSearch() throws ExtractionException, IOException {
7171
* Tests whether searching bandcamp for "minecraft volume alpha" returns the corresponding album
7272
*/
7373
@Test
74-
public void testAlbumSearch() throws ExtractionException, IOException {
74+
void testAlbumSearch() throws ExtractionException, IOException {
7575
final SearchExtractor extractor = Bandcamp.getSearchExtractor("minecraft volume alpha");
7676
InfoItem minecraft = extractor.getInitialPage()
7777
.getItems().get(0);
7878

7979
// Minecraft volume alpha should be the first result, no?
80-
assertEquals("Minecraft - Volume Alpha", minecraft.getName());
80+
assertEquals("Minecraft: Volume Alpha (cover)", minecraft.getName());
8181
assertTrue(minecraft.getThumbnailUrl().endsWith(".jpg"));
8282
assertTrue(minecraft.getThumbnailUrl().contains("f4.bcbits.com/img/"));
83-
assertEquals("https://c418.bandcamp.com/album/minecraft-volume-alpha", minecraft.getUrl());
83+
assertEquals(
84+
"https://chromacat248.bandcamp.com/album/minecraft-volume-alpha-cover",
85+
minecraft.getUrl());
8486

8587
// Verify that playlist tracks counts get extracted correctly
86-
assertEquals(24, ((PlaylistInfoItem) minecraft).getStreamCount());
88+
assertEquals(3, ((PlaylistInfoItem) minecraft).getStreamCount());
8789

8890
}
8991

9092
/**
9193
* Tests searches with multiple pages
9294
*/
9395
@Test
94-
public void testMultiplePages() throws ExtractionException, IOException {
96+
void testMultiplePages() throws ExtractionException, IOException {
9597
// A query practically guaranteed to have the maximum amount of pages
9698
final SearchExtractor extractor = Bandcamp.getSearchExtractor("e");
9799

0 commit comments

Comments
 (0)