@@ -19,7 +19,7 @@ public class PeertubeStreamLinkHandlerFactoryTest {
1919
2020 @ BeforeClass
2121 public static void setUp () {
22- PeerTube .setInstance (new PeertubeInstance ("https://peertube.mastodon.host " , "PeerTube on Mastodon.host " ));
22+ PeerTube .setInstance (new PeertubeInstance ("https://framatube.org " , "Framatube " ));
2323 linkHandler = PeertubeStreamLinkHandlerFactory .getInstance ();
2424 NewPipe .init (DownloaderTestImpl .getInstance ());
2525 }
@@ -30,30 +30,42 @@ public void getId() throws Exception {
3030 linkHandler .fromUrl ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ).getId ());
3131 assertEquals ("986aac60-1263-4f73-9ce5-36b18225cb60" ,
3232 linkHandler .fromUrl ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60?fsdafs=fsafa" ).getId ());
33- assertEquals ("9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
34- linkHandler .fromUrl ("https://framatube.org/videos/embed/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getId ());
3533 assertEquals ("986aac60-1263-4f73-9ce5-36b18225cb60" ,
3634 linkHandler .fromUrl ("https://peertube.mastodon.host/api/v1/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ).getId ());
3735 assertEquals ("986aac60-1263-4f73-9ce5-36b18225cb60" ,
3836 linkHandler .fromUrl ("https://peertube.mastodon.host/api/v1/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60?fsdafs=fsafa" ).getId ());
37+
38+ assertEquals ("9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
39+ linkHandler .fromUrl ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getId ());
40+ assertEquals ("9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
41+ linkHandler .fromUrl ("https://framatube.org/videos/embed/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getId ());
42+ assertEquals ("9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
43+ linkHandler .fromUrl ("https://framatube.org/w/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getId ());
3944 }
4045
4146 @ Test
4247 public void getUrl () throws Exception {
43- assertEquals ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ,
44- linkHandler .fromId ("986aac60-1263-4f73-9ce5-36b18225cb60" ).getUrl ());
45- assertEquals ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ,
46- linkHandler .fromUrl ("https://peertube.mastodon.host/api/v1/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ).getUrl ());
47- assertEquals ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ,
48- linkHandler .fromUrl ("https://peertube.mastodon.host/videos/embed/986aac60-1263-4f73-9ce5-36b18225cb60" ).getUrl ());
48+ assertEquals ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
49+ linkHandler .fromId ("9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getUrl ());
50+ assertEquals ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
51+ linkHandler .fromUrl ("https://framatube.org/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getUrl ());
52+ assertEquals ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
53+ linkHandler .fromUrl ("https://framatube.org/videos/embed/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getUrl ());
54+ assertEquals ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
55+ linkHandler .fromUrl ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getUrl ());
56+ assertEquals ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ,
57+ linkHandler .fromUrl ("https://framatube.org/w/9c9de5e8-0a1e-484a-b099-e80766180a6d" ).getUrl ());
4958 }
5059
5160
5261 @ Test
5362 public void testAcceptUrl () throws ParsingException {
5463 assertTrue (linkHandler .acceptUrl ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60" ));
5564 assertTrue (linkHandler .acceptUrl ("https://peertube.mastodon.host/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60?fsdafs=fsafa" ));
65+
66+ assertTrue (linkHandler .acceptUrl ("https://framatube.org/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d" ));
5667 assertTrue (linkHandler .acceptUrl ("https://framatube.org/videos/embed/9c9de5e8-0a1e-484a-b099-e80766180a6d" ));
57- assertTrue (linkHandler .acceptUrl ("https://peertube.mastodon.host/api/v1/videos/watch/986aac60-1263-4f73-9ce5-36b18225cb60?fsdafs=fsafa" ));
68+ assertTrue (linkHandler .acceptUrl ("https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d" ));
69+ assertTrue (linkHandler .acceptUrl ("https://framatube.org/w/9c9de5e8-0a1e-484a-b099-e80766180a6d" ));
5870 }
59- }
71+ }
0 commit comments