Skip to content

Commit d4f551c

Browse files
committed
Rename test + Fix assert order warning
1 parent 69c0bb7 commit d4f551c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/NewPipeTest.java renamed to extractor/src/test/java/org/schabi/newpipe/extractor/GeneralNewPipeTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import java.util.HashSet;
1212

13-
public class NewPipeTest {
13+
public class GeneralNewPipeTest {
1414
@Test
1515
public void getAllServicesTest() throws Exception {
1616
assertEquals(NewPipe.getServices().size(), ServiceList.all().size());
@@ -30,17 +30,17 @@ public void testAllServicesHaveDifferentId() throws Exception {
3030

3131
@Test
3232
public void getServiceWithId() throws Exception {
33-
assertEquals(NewPipe.getService(YouTube.getServiceId()), YouTube);
33+
assertEquals(YouTube, NewPipe.getService(YouTube.getServiceId()));
3434
}
3535

3636
@Test
3737
public void getServiceWithUrl() throws Exception {
38-
assertEquals(getServiceByUrl("https://www.youtube.com/watch?v=_r6CgaFNAGg"), YouTube);
39-
assertEquals(getServiceByUrl("https://www.youtube.com/channel/UCi2bIyFtz-JdI-ou8kaqsqg"), YouTube);
40-
assertEquals(getServiceByUrl("https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH"), YouTube);
41-
assertEquals(getServiceByUrl("https://www.google.it/url?sa=t&rct=j&q=&esrc=s&cd=&cad=rja&uact=8&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHu80uDzh8RY&source=video"), YouTube);
38+
assertEquals(YouTube, getServiceByUrl("https://www.youtube.com/watch?v=_r6CgaFNAGg"));
39+
assertEquals(YouTube, getServiceByUrl("https://www.youtube.com/channel/UCi2bIyFtz-JdI-ou8kaqsqg"));
40+
assertEquals(YouTube, getServiceByUrl("https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH"));
41+
assertEquals(YouTube, getServiceByUrl("https://www.google.it/url?sa=t&rct=j&q=&esrc=s&cd=&cad=rja&uact=8&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHu80uDzh8RY&source=video"));
4242

43-
assertEquals(getServiceByUrl("https://soundcloud.com/pegboardnerds"), SoundCloud);
44-
assertEquals(getServiceByUrl("https://www.google.com/url?sa=t&url=https%3A%2F%2Fsoundcloud.com%2Fciaoproduction&rct=j&q=&esrc=s&source=web&cd="), SoundCloud);
43+
assertEquals(SoundCloud, getServiceByUrl("https://soundcloud.com/pegboardnerds"));
44+
assertEquals(SoundCloud, getServiceByUrl("https://www.google.com/url?sa=t&url=https%3A%2F%2Fsoundcloud.com%2Fciaoproduction&rct=j&q=&esrc=s&source=web&cd="));
4545
}
4646
}

0 commit comments

Comments
 (0)