Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lasers
NewPipeExtractor
Commits
f9d06252
Commit
f9d06252
authored
Mar 13, 2021
by
TobiGr
Browse files
[Bandcamp] Fix tests
parent
7e6f4644
Changes
2
Show whitespace changes
Inline
Side-by-side
extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampChannelLinkHandlerFactoryTest.java
View file @
f9d06252
...
@@ -38,8 +38,8 @@ public class BandcampChannelLinkHandlerFactoryTest {
...
@@ -38,8 +38,8 @@ public class BandcampChannelLinkHandlerFactoryTest {
assertFalse
(
linkHandler
.
acceptUrl
(
"https://daily.bandcamp.com/best-of-2020/bandcamp-daily-staffers-on-their-favorite-albums-of-2020"
));
assertFalse
(
linkHandler
.
acceptUrl
(
"https://daily.bandcamp.com/best-of-2020/bandcamp-daily-staffers-on-their-favorite-albums-of-2020"
));
// External URLs
// External URLs
assertTrue
(
linkHandler
.
acceptUrl
(
"http://interovgm.com/releases
/
"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"http
s
://interovgm.
bandcamp.
com/releases"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://interovgm.com/releases"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://interovgm.
bandcamp.
com/releases
/
"
));
assertFalse
(
linkHandler
.
acceptUrl
(
"https://example.com/releases"
));
assertFalse
(
linkHandler
.
acceptUrl
(
"https://example.com/releases"
));
}
}
...
@@ -48,7 +48,7 @@ public class BandcampChannelLinkHandlerFactoryTest {
...
@@ -48,7 +48,7 @@ public class BandcampChannelLinkHandlerFactoryTest {
public
void
testGetId
()
throws
ParsingException
{
public
void
testGetId
()
throws
ParsingException
{
assertEquals
(
"1196681540"
,
linkHandler
.
getId
(
"https://macbenson.bandcamp.com/"
));
assertEquals
(
"1196681540"
,
linkHandler
.
getId
(
"https://macbenson.bandcamp.com/"
));
assertEquals
(
"1196681540"
,
linkHandler
.
getId
(
"http://macbenson.bandcamp.com/"
));
assertEquals
(
"1196681540"
,
linkHandler
.
getId
(
"http://macbenson.bandcamp.com/"
));
assertEquals
(
"1581461772"
,
linkHandler
.
getId
(
"https://interovgm.com/releases"
));
assertEquals
(
"1581461772"
,
linkHandler
.
getId
(
"https://interovgm.
bandcamp.
com/releases"
));
assertEquals
(
"3321800855"
,
linkHandler
.
getId
(
"https://infiniteammo.bandcamp.com/"
));
assertEquals
(
"3321800855"
,
linkHandler
.
getId
(
"https://infiniteammo.bandcamp.com/"
));
assertEquals
(
"3775652329"
,
linkHandler
.
getId
(
"https://npet.bandcamp.com/"
));
assertEquals
(
"3775652329"
,
linkHandler
.
getId
(
"https://npet.bandcamp.com/"
));
}
}
...
@@ -56,7 +56,7 @@ public class BandcampChannelLinkHandlerFactoryTest {
...
@@ -56,7 +56,7 @@ public class BandcampChannelLinkHandlerFactoryTest {
@Test
@Test
public
void
testGetUrl
()
throws
ParsingException
{
public
void
testGetUrl
()
throws
ParsingException
{
assertEquals
(
"https://macbenson.bandcamp.com"
,
linkHandler
.
getUrl
(
"1196681540"
));
assertEquals
(
"https://macbenson.bandcamp.com"
,
linkHandler
.
getUrl
(
"1196681540"
));
assertEquals
(
"https://interovgm.com"
,
linkHandler
.
getUrl
(
"1581461772"
));
assertEquals
(
"https://interovgm.
bandcamp.
com"
,
linkHandler
.
getUrl
(
"1581461772"
));
assertEquals
(
"https://infiniteammo.bandcamp.com"
,
linkHandler
.
getUrl
(
"3321800855"
));
assertEquals
(
"https://infiniteammo.bandcamp.com"
,
linkHandler
.
getUrl
(
"3321800855"
));
}
}
...
...
extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamLinkHandlerFactoryTest.java
View file @
f9d06252
...
@@ -46,7 +46,7 @@ public class BandcampStreamLinkHandlerFactoryTest {
...
@@ -46,7 +46,7 @@ public class BandcampStreamLinkHandlerFactoryTest {
assertTrue
(
linkHandler
.
acceptUrl
(
"https://zachbenson.bandcamp.com/track/kitchen"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://zachbenson.bandcamp.com/track/kitchen"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"http://ZachBenson.Bandcamp.COM/Track/U-I-Tonite/"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"http://ZachBenson.Bandcamp.COM/Track/U-I-Tonite/"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://interovgm.com/track/title"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://interovgm.
bandcamp.
com/track/title"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"http://bandcamP.com/?show=38"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"http://bandcamP.com/?show=38"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://goodgoodblood-tl.bandcamp.com/track/when-it-all-wakes-up"
));
assertTrue
(
linkHandler
.
acceptUrl
(
"https://goodgoodblood-tl.bandcamp.com/track/when-it-all-wakes-up"
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment