kopia lustrzana https://github.com/TeamNewPipe/NewPipeExtractor
Rename testDoNotAcceptNonURLs() -> assertDoNotAcceptNonURLs()
rodzic
9d66debf3c
commit
9ab932e394
|
@ -9,7 +9,7 @@ import org.schabi.newpipe.extractor.services.peertube.linkHandler.PeertubeChanne
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs;
|
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link PeertubeChannelLinkHandlerFactory}
|
* Test for {@link PeertubeChannelLinkHandlerFactory}
|
||||||
|
@ -34,7 +34,7 @@ public class PeertubeChannelLinkHandlerFactoryTest {
|
||||||
assertTrue(linkHandler.acceptUrl("https://peertube.stream/c/kranti_channel@videos.squat.net/videos"));
|
assertTrue(linkHandler.acceptUrl("https://peertube.stream/c/kranti_channel@videos.squat.net/videos"));
|
||||||
assertTrue(linkHandler.acceptUrl("https://peertube.stream/api/v1/video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa"));
|
assertTrue(linkHandler.acceptUrl("https://peertube.stream/api/v1/video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa"));
|
||||||
|
|
||||||
testDoNotAcceptNonURLs(linkHandler);
|
assertDoNotAcceptNonURLs(linkHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.schabi.newpipe.extractor.services.peertube.linkHandler.PeertubeCommen
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs;
|
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link PeertubeCommentsLinkHandlerFactory}
|
* Test for {@link PeertubeCommentsLinkHandlerFactory}
|
||||||
|
@ -33,7 +33,7 @@ public class PeertubeCommentsLinkHandlerFactoryTest {
|
||||||
assertTrue(linkHandler.acceptUrl("https://framatube.org/w/9c9de5e8-0a1e-484a-b099-e80766180a6d"));
|
assertTrue(linkHandler.acceptUrl("https://framatube.org/w/9c9de5e8-0a1e-484a-b099-e80766180a6d"));
|
||||||
assertTrue(linkHandler.acceptUrl("https://framatube.org/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/comment-threads?start=0&count=10&sort=-createdAt"));
|
assertTrue(linkHandler.acceptUrl("https://framatube.org/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/comment-threads?start=0&count=10&sort=-createdAt"));
|
||||||
|
|
||||||
testDoNotAcceptNonURLs(linkHandler);
|
assertDoNotAcceptNonURLs(linkHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
|
||||||
public class PeertubeLinkHandlerFactoryTestHelper {
|
public class PeertubeLinkHandlerFactoryTestHelper {
|
||||||
|
|
||||||
public static void testDoNotAcceptNonURLs(LinkHandlerFactory linkHandler)
|
public static void assertDoNotAcceptNonURLs(LinkHandlerFactory linkHandler)
|
||||||
throws ParsingException {
|
throws ParsingException {
|
||||||
assertFalse(linkHandler.acceptUrl("orchestr/a/"));
|
assertFalse(linkHandler.acceptUrl("orchestr/a/"));
|
||||||
assertFalse(linkHandler.acceptUrl("/a/"));
|
assertFalse(linkHandler.acceptUrl("/a/"));
|
||||||
|
@ -23,7 +23,7 @@ public class PeertubeLinkHandlerFactoryTestHelper {
|
||||||
assertFalse(linkHandler.acceptUrl("986513"));
|
assertFalse(linkHandler.acceptUrl("986513"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void testDoNotAcceptNonURLs(ListLinkHandlerFactory linkHandler)
|
public static void assertDoNotAcceptNonURLs(ListLinkHandlerFactory linkHandler)
|
||||||
throws ParsingException {
|
throws ParsingException {
|
||||||
assertFalse(linkHandler.acceptUrl("orchestr/a/"));
|
assertFalse(linkHandler.acceptUrl("orchestr/a/"));
|
||||||
assertFalse(linkHandler.acceptUrl("/a/"));
|
assertFalse(linkHandler.acceptUrl("/a/"));
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.schabi.newpipe.extractor.services.peertube.linkHandler.PeertubePlayli
|
||||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs;
|
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link PeertubePlaylistLinkHandlerFactory}
|
* Test for {@link PeertubePlaylistLinkHandlerFactory}
|
||||||
|
@ -35,7 +35,7 @@ public class PeertubePlaylistLinkHandlerFactoryTest {
|
||||||
assertTrue(linkHandler.acceptUrl("https://framatube.org/videos/watch/playlist/96b0ee2b-a5a7-4794-8769-58d8ccb79ab7"));
|
assertTrue(linkHandler.acceptUrl("https://framatube.org/videos/watch/playlist/96b0ee2b-a5a7-4794-8769-58d8ccb79ab7"));
|
||||||
assertTrue(linkHandler.acceptUrl("https://framatube.org/w/p/96b0ee2b-a5a7-4794-8769-58d8ccb79ab7"));
|
assertTrue(linkHandler.acceptUrl("https://framatube.org/w/p/96b0ee2b-a5a7-4794-8769-58d8ccb79ab7"));
|
||||||
|
|
||||||
testDoNotAcceptNonURLs(linkHandler);
|
assertDoNotAcceptNonURLs(linkHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.schabi.newpipe.extractor.services.peertube.linkHandler.PeertubeStream
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs;
|
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link PeertubeStreamLinkHandlerFactory}
|
* Test for {@link PeertubeStreamLinkHandlerFactory}
|
||||||
|
@ -73,6 +73,6 @@ public class PeertubeStreamLinkHandlerFactoryTest {
|
||||||
assertFalse(linkHandler.acceptUrl("https://framatube.org/w/p/dacdc4ef-5160-4846-9b70-a655880da667"));
|
assertFalse(linkHandler.acceptUrl("https://framatube.org/w/p/dacdc4ef-5160-4846-9b70-a655880da667"));
|
||||||
assertFalse(linkHandler.acceptUrl("https://framatube.org/videos/watch/playlist/dacdc4ef-5160-4846-9b70-a655880da667"));
|
assertFalse(linkHandler.acceptUrl("https://framatube.org/videos/watch/playlist/dacdc4ef-5160-4846-9b70-a655880da667"));
|
||||||
|
|
||||||
PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs(linkHandler);
|
PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs(linkHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.schabi.newpipe.extractor.services.peertube.linkHandler.PeertubeTrendi
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs;
|
import static org.schabi.newpipe.extractor.services.peertube.PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link PeertubeTrendingLinkHandlerFactory}
|
* Test for {@link PeertubeTrendingLinkHandlerFactory}
|
||||||
|
@ -59,6 +59,6 @@ public class PeertubeTrendingLinkHandlerFactoryTest {
|
||||||
assertTrue(LinkHandlerFactory.acceptUrl("https://peertube.mastodon.host/videos/local"));
|
assertTrue(LinkHandlerFactory.acceptUrl("https://peertube.mastodon.host/videos/local"));
|
||||||
assertTrue(LinkHandlerFactory.acceptUrl("https://peertube.mastodon.host/videos/local?adsf=fjaj#fhe"));
|
assertTrue(LinkHandlerFactory.acceptUrl("https://peertube.mastodon.host/videos/local?adsf=fjaj#fhe"));
|
||||||
|
|
||||||
PeertubeLinkHandlerFactoryTestHelper.testDoNotAcceptNonURLs(LinkHandlerFactory);
|
PeertubeLinkHandlerFactoryTestHelper.assertDoNotAcceptNonURLs(LinkHandlerFactory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue