@@ -22,12 +22,12 @@ public static void setUp() {
2222 }
2323
2424 @ Test
25- public void getIdWithNullAsUrl () {
26- assertThrows (IllegalArgumentException .class , () -> linkHandler .fromId (null ));
25+ void getIdWithNullAsUrl () {
26+ assertThrows (NullPointerException .class , () -> linkHandler .fromId (null ));
2727 }
2828
2929 @ Test
30- public void getIdfromYt () throws Exception {
30+ void getIdfromYt () throws Exception {
3131 assertEquals ("PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" , linkHandler .fromUrl ("https://www.youtube.com/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" ).getId ());
3232 assertEquals ("PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" , linkHandler .fromUrl ("https://www.youtube.com/playlist?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ).getId ());
3333 assertEquals ("PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" , linkHandler .fromUrl ("https://www.youtube.com/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC&t=100" ).getId ());
@@ -43,7 +43,7 @@ public void getIdfromYt() throws Exception {
4343 }
4444
4545 @ Test
46- public void testAcceptYtUrl () throws ParsingException {
46+ void testAcceptYtUrl () throws ParsingException {
4747 assertTrue (linkHandler .acceptUrl ("https://www.youtube.com/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" ));
4848 assertTrue (linkHandler .acceptUrl ("https://www.youtube.com/playlist?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
4949 assertTrue (linkHandler .acceptUrl ("https://WWW.youtube.com/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dCI" ));
@@ -60,7 +60,7 @@ public void testAcceptYtUrl() throws ParsingException {
6060 }
6161
6262 @ Test
63- public void testDeniesInvalidYtUrl () throws ParsingException {
63+ void testDeniesInvalidYtUrl () throws ParsingException {
6464 assertFalse (linkHandler .acceptUrl ("https://www.youtube.com/feed/trending?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
6565 assertFalse (linkHandler .acceptUrl ("https://www.youtube.com/feed/subscriptions?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
6666 assertFalse (linkHandler .acceptUrl ("ftp://www.youtube.com/feed/trending?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
@@ -70,7 +70,7 @@ public void testDeniesInvalidYtUrl() throws ParsingException {
7070 }
7171
7272 @ Test
73- public void testAcceptInvidioUrl () throws ParsingException {
73+ void testAcceptInvidioUrl () throws ParsingException {
7474 assertTrue (linkHandler .acceptUrl ("https://www.invidio.us/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" ));
7575 assertTrue (linkHandler .acceptUrl ("https://www.invidio.us/playlist?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
7676 assertTrue (linkHandler .acceptUrl ("https://WWW.invidio.us/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dCI" ));
@@ -83,7 +83,7 @@ public void testAcceptInvidioUrl() throws ParsingException {
8383 }
8484
8585 @ Test
86- public void testDeniesInvalidInvidioUrl () throws ParsingException {
86+ void testDeniesInvalidInvidioUrl () throws ParsingException {
8787 assertFalse (linkHandler .acceptUrl ("https://invidio.us/feed/trending?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
8888 assertFalse (linkHandler .acceptUrl ("https://invidio.us/feed/subscriptions?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
8989 assertFalse (linkHandler .acceptUrl ("ftp:/invidio.us/feed/trending?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ));
@@ -93,7 +93,7 @@ public void testDeniesInvalidInvidioUrl() throws ParsingException {
9393 }
9494
9595 @ Test
96- public void testGetInvidioIdfromUrl () throws ParsingException {
96+ void testGetInvidioIdfromUrl () throws ParsingException {
9797 assertEquals ("PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" , linkHandler .fromUrl ("https://www.invidio.us/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" ).getId ());
9898 assertEquals ("PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" , linkHandler .fromUrl ("https://www.invidio.us/playlist?list=PLz8YL4HVC87WJQDzVoY943URKQCsHS9XV" ).getId ());
9999 assertEquals ("PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC" , linkHandler .fromUrl ("https://www.invidio.us/playlist?list=PLW5y1tjAOzI3orQNF1yGGVL5x-pR2K1dC&t=100" ).getId ());
@@ -107,7 +107,7 @@ public void testGetInvidioIdfromUrl() throws ParsingException {
107107 }
108108
109109 @ Test
110- public void fromUrlIsMixVideo () throws Exception {
110+ void fromUrlIsMixVideo () throws Exception {
111111 final String videoId = "_AzeUSL9lZc" ;
112112 String url = "https://www.youtube.com/watch?v=" + videoId + "&list=RD" + videoId ;
113113 assertEquals (url , linkHandler .fromUrl (url ).getUrl ());
@@ -118,7 +118,7 @@ public void fromUrlIsMixVideo() throws Exception {
118118 }
119119
120120 @ Test
121- public void fromUrlIsMixPlaylist () throws Exception {
121+ void fromUrlIsMixPlaylist () throws Exception {
122122 final String videoId = "_AzeUSL9lZc" ;
123123 final String url = "https://www.youtube.com/watch?v=" + videoId + "&list=RD" + videoId ;
124124 assertEquals (url ,
0 commit comments