Skip to content

Commit

Permalink
Kitsu changed domain from kitsu.io to kitsu.app
Browse files Browse the repository at this point in the history
  • Loading branch information
manami-project committed Aug 12, 2024
1 parent 03c090f commit d8636c5
Show file tree
Hide file tree
Showing 12 changed files with 300 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ internal class DefaultAnimeCacheTest {
URI("https://anidb.net/anime/15807"),
URI("https://anilist.co/anime/125368"),
URI("https://anime-planet.com/anime/kaguya-sama-love-is-war-ova"),
URI("https://kitsu.io/anime/43731"),
URI("https://kitsu.app/anime/43731"),
URI("https://myanimelist.net/anime/43609"),
URI("https://notify.moe/anime/_RdVrLpGR"),
),
Expand Down Expand Up @@ -237,7 +237,7 @@ internal class DefaultAnimeCacheTest {
"anidb.net",
"anilist.co",
"anime-planet.com",
"kitsu.io",
"kitsu.app",
"myanimelist.net",
"notify.moe",
)
Expand All @@ -255,7 +255,7 @@ internal class DefaultAnimeCacheTest {
URI("https://anidb.net/anime/15807"),
URI("https://anilist.co/anime/125368"),
URI("https://anime-planet.com/anime/kaguya-sama-love-is-war-ova"),
URI("https://kitsu.io/anime/43731"),
URI("https://kitsu.app/anime/43731"),
URI("https://myanimelist.net/anime/43609"),
URI("https://notify.moe/anime/_RdVrLpGR"),
),
Expand Down Expand Up @@ -327,7 +327,7 @@ internal class DefaultAnimeCacheTest {
URI("https://anidb.net/anime/15738"),
URI("https://anilist.co/anime/124194"),
URI("https://anime-planet.com/anime/fruits-basket-the-final"),
URI("https://kitsu.io/anime/43578"),
URI("https://kitsu.app/anime/43578"),
URI("https://myanimelist.net/anime/42938"),
URI("https://notify.moe/anime/YiySZ9OMg"),
),
Expand All @@ -346,7 +346,7 @@ internal class DefaultAnimeCacheTest {
URI("https://anidb.net/anime/15807"),
URI("https://anilist.co/anime/125368"),
URI("https://anime-planet.com/anime/kaguya-sama-love-is-war-ova"),
URI("https://kitsu.io/anime/43731"),
URI("https://kitsu.app/anime/43731"),
URI("https://myanimelist.net/anime/43609"),
URI("https://notify.moe/anime/_RdVrLpGR"),
),
Expand Down Expand Up @@ -393,7 +393,7 @@ internal class DefaultAnimeCacheTest {

val entry5 = Anime(
sources = hashSetOf(
URI("https://kitsu.io/anime/40614"),
URI("https://kitsu.app/anime/40614"),
URI("https://myanimelist.net/anime/34705"),
URI("https://notify.moe/anime/3I2v2FmiR"),
),
Expand Down Expand Up @@ -503,7 +503,7 @@ internal class DefaultAnimeCacheTest {
)

// when
val result = defaultAnimeCache.mapToMetaDataProvider(MyanimelistConfig.buildAnimeLink("1535"), "kitsu.io")
val result = defaultAnimeCache.mapToMetaDataProvider(MyanimelistConfig.buildAnimeLink("1535"), "kitsu.app")

// then
assertThat(result).isEmpty()
Expand All @@ -521,7 +521,7 @@ internal class DefaultAnimeCacheTest {
URI("https://anidb.net/anime/15807"),
URI("https://anilist.co/anime/125368"),
URI("https://anime-planet.com/anime/kaguya-sama-love-is-war-ova"),
URI("https://kitsu.io/anime/43731"),
URI("https://kitsu.app/anime/43731"),
URI("https://myanimelist.net/anime/43609"),
URI("https://notify.moe/anime/_RdVrLpGR"),
),
Expand All @@ -538,10 +538,10 @@ internal class DefaultAnimeCacheTest {
}

// when
val result = defaultAnimeCache.mapToMetaDataProvider(MyanimelistConfig.buildAnimeLink("43609"), "kitsu.io")
val result = defaultAnimeCache.mapToMetaDataProvider(MyanimelistConfig.buildAnimeLink("43609"), "kitsu.app")

// then
assertThat(result).containsExactly(URI("https://kitsu.io/anime/43731"))
assertThat(result).containsExactly(URI("https://kitsu.app/anime/43731"))
}

@Test
Expand All @@ -553,7 +553,7 @@ internal class DefaultAnimeCacheTest {

val testAnime = Anime(
sources = hashSetOf(
URI("https://kitsu.io/anime/45724"),
URI("https://kitsu.app/anime/45724"),
URI("https://myanimelist.net/anime/50731"),
URI("https://myanimelist.net/anime/50814"),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ internal class KitsuCacheLoaderTest {
season = SUMMER,
year = 2020,
),
picture = URI("https://media.kitsu.io/anime/poster_images/42194/small.jpg?1592953088"),
thumbnail = URI("https://media.kitsu.io/anime/poster_images/42194/tiny.jpg?1592953088"),
picture = URI("https://media.kitsu.app/anime/poster_images/42194/small.jpg?1592953088"),
thumbnail = URI("https://media.kitsu.app/anime/poster_images/42194/tiny.jpg?1592953088"),
duration = Duration(24, MINUTES),
).apply {
addSources(URI("https://kitsu.io/anime/42194"))
addSources(URI("https://kitsu.app/anime/42194"))
addSynonyms(
"My Teen Romantic Comedy SNAFU 3",
"My Teen Romantic Comedy SNAFU Climax",
"My youth romantic comedy is wrong as I expected 3",
"Oregairu 3",
"やはり俺の青春ラブコメはまちがっている。完",
)
addRelatedAnime(URI("https://kitsu.io/anime/8478"))
addRelatedAnime(URI("https://kitsu.app/anime/8478"))
addTags(
"asia",
"comedy",
Expand All @@ -92,9 +92,9 @@ internal class KitsuCacheLoaderTest {
val testHttpClient = object: HttpClient by TestHttpClient {
override suspend fun get(url: URL, headers: Map<String, Collection<String>>): HttpResponse {
val response = when(url.toString()) {
"https://kitsu.io/api/edge/anime/42194" -> loadTestResource<String>("cache_tests/loader/kitsu/42194.json")
"https://kitsu.io/api/edge/media-relationships?filter[source_id]=42194&filter[source_type]=Anime&include=destination&sort=role" -> loadTestResource<String>("cache_tests/loader/kitsu/42194_relations.json")
"https://kitsu.io/api/edge/anime/42194/categories" -> loadTestResource<String>("cache_tests/loader/kitsu/42194_tags.json")
"https://kitsu.app/api/edge/anime/42194" -> loadTestResource<String>("cache_tests/loader/kitsu/42194.json")
"https://kitsu.app/api/edge/media-relationships?filter[source_id]=42194&filter[source_type]=Anime&include=destination&sort=role" -> loadTestResource<String>("cache_tests/loader/kitsu/42194_relations.json")
"https://kitsu.app/api/edge/anime/42194/categories" -> loadTestResource<String>("cache_tests/loader/kitsu/42194_tags.json")
else -> shouldNotBeInvoked()
}

Expand All @@ -118,7 +118,7 @@ internal class KitsuCacheLoaderTest {
)

// when
val result = notifyCacheLoader.loadAnime(URI("https://kitsu.io/anime/42194"))
val result = notifyCacheLoader.loadAnime(URI("https://kitsu.app/anime/42194"))

// then
assertThat(result).isEqualTo(expectedAnime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ internal class AnimeCachePopulatorTest: MockServerTestCase<WireMockServer> by Wi
assertThat((testCache.fetch(URI("https://anime-planet.com/anime/death-note")) as PresentValue).value).isEqualTo(expectedAnimePlanetEntry)

val expectedKitsuEntry = expectedAnime.copy(
sources = hashSetOf(URI("https://kitsu.io/anime/1376")),
relatedAnime = hashSetOf(URI("https://kitsu.io/anime/2707")),
sources = hashSetOf(URI("https://kitsu.app/anime/1376")),
relatedAnime = hashSetOf(URI("https://kitsu.app/anime/2707")),
)
assertThat((testCache.fetch(URI("https://kitsu.io/anime/1376")) as PresentValue).value).isEqualTo(expectedKitsuEntry)
assertThat((testCache.fetch(URI("https://kitsu.app/anime/1376")) as PresentValue).value).isEqualTo(expectedKitsuEntry)

val expectedMalEntry = expectedAnime.copy(
sources = hashSetOf(URI("https://myanimelist.net/anime/1535")),
Expand All @@ -178,7 +178,7 @@ internal class AnimeCachePopulatorTest: MockServerTestCase<WireMockServer> by Wi
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["anidb.net"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["anilist.co"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["anime-planet.com"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["kitsu.io"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["kitsu.app"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["myanimelist.net"]).isEqualTo(1)
assertThat((receivedEvents.first() as NumberOfEntriesPerMetaDataProviderEvent).entries["notify.moe"]).isEqualTo(1)
assertThat(receivedEvents.last()).isInstanceOf(CachePopulatorFinishedEvent::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class IgnoreListEntryTest {
URI("https://anidb.net/anime/4563"),
URI("https://anilist.co/anime/1535"),
URI("https://anime-planet.com/anime/death-note"),
URI("https://kitsu.io/anime/1376"),
URI("https://kitsu.app/anime/1376"),
URI("https://myanimelist.net/anime/1535"),
URI("https://notify.moe/anime/0-A-5Fimg")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class WatchListEntryTest {
URI("https://anidb.net/anime/4563"),
URI("https://anilist.co/anime/1535"),
URI("https://anime-planet.com/anime/death-note"),
URI("https://kitsu.io/anime/1376"),
URI("https://kitsu.app/anime/1376"),
URI("https://myanimelist.net/anime/1535"),
URI("https://notify.moe/anime/0-A-5Fimg"),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal class DefaultMetaDataMigrationHandlerTest {
}

// then
assertThat(result).hasMessage("MetaDataProvider [kitsu.io] is not supported.")
assertThat(result).hasMessage("MetaDataProvider [kitsu.app] is not supported.")
}

@Test
Expand Down
Loading

0 comments on commit d8636c5

Please sign in to comment.