added Invidio subdomain test and fixed error in test caused by Invidio playlist support
This commit is contained in:
parent
10939efcce
commit
ec4aa9e0cd
|
@ -127,18 +127,20 @@ public class YoutubeStreamLinkHandlerFactoryTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAcceptInvidioUrl() throws ParsingException {
|
public void testAcceptInvidioUrl() throws ParsingException {
|
||||||
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=TglNG-yjabU"));
|
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=TglNG-yjabU"));
|
||||||
|
assertTrue(linkHandler.acceptUrl("http://www.invidio.us/watch?v=TglNG-yjabU"));
|
||||||
assertTrue(linkHandler.acceptUrl("http://invidio.us/watch?v=TglNG-yjabU"));
|
assertTrue(linkHandler.acceptUrl("http://invidio.us/watch?v=TglNG-yjabU"));
|
||||||
assertTrue(linkHandler.acceptUrl("invidio.us/watch?v=3msbfr6pBNE"));
|
assertTrue(linkHandler.acceptUrl("invidio.us/watch?v=3msbfr6pBNE"));
|
||||||
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=ocH3oSnZG3c&list=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2"));
|
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=ocH3oSnZG3c&test=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2"));
|
||||||
assertTrue(linkHandler.acceptUrl("invidio.us/embed/3msbfr6pBNE"));
|
assertTrue(linkHandler.acceptUrl("invidio.us/embed/3msbfr6pBNE"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetInvidioIdfromUrl() throws ParsingException {
|
public void testGetInvidioIdfromUrl() throws ParsingException {
|
||||||
assertEquals("TglNG-yjabU", linkHandler.fromUrl("https://invidio.us/watch?v=TglNG-yjabU").getId());
|
assertEquals("TglNG-yjabU", linkHandler.fromUrl("https://invidio.us/watch?v=TglNG-yjabU").getId());
|
||||||
|
assertEquals("TglNG-yjabU", linkHandler.fromUrl("http://www.invidio.us/watch?v=TglNG-yjabU").getId());
|
||||||
assertEquals("TglNG-yjabU", linkHandler.fromUrl("http://invidio.us/watch?v=TglNG-yjabU").getId());
|
assertEquals("TglNG-yjabU", linkHandler.fromUrl("http://invidio.us/watch?v=TglNG-yjabU").getId());
|
||||||
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/watch?v=3msbfr6pBNE").getId());
|
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/watch?v=3msbfr6pBNE").getId());
|
||||||
assertEquals("ocH3oSnZG3c", linkHandler.fromUrl("https://invidio.us/watch?v=ocH3oSnZG3c&list=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2").getId());
|
assertEquals("ocH3oSnZG3c", linkHandler.fromUrl("https://invidio.us/watch?v=ocH3oSnZG3c&test=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2").getId());
|
||||||
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/embed/3msbfr6pBNE").getId());
|
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/embed/3msbfr6pBNE").getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue