diff --git a/pom.xml b/pom.xml index 52836c95..59d7d613 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dev.katsute mal4j - 3.4.2 + 3.4.3 diff --git a/src/main/java/dev/katsute/mal4j/property/RelationType.java b/src/main/java/dev/katsute/mal4j/property/RelationType.java index 2722a49e..30eeb393 100644 --- a/src/main/java/dev/katsute/mal4j/property/RelationType.java +++ b/src/main/java/dev/katsute/mal4j/property/RelationType.java @@ -25,7 +25,7 @@ * * @see RelatedMedia#getRelationType() * @since 1.0.0 - * @version 2.9.0 + * @version 3.4.3 * @author Katsute */ public enum RelationType implements FieldEnum { @@ -35,6 +35,7 @@ public enum RelationType implements FieldEnum { Other ("other"), Sequel ("sequel"), Prequel ("prequel"), + Adaptation ("adaptation"), AlternativeSetting ("alternative_setting"), AlternativeVersion ("alternative_version"), SideStory ("side_story"), diff --git a/src/test/java/dev/katsute/mal4j/MangaTests/TestManga.java b/src/test/java/dev/katsute/mal4j/MangaTests/TestManga.java index 86620b20..23139faf 100644 --- a/src/test/java/dev/katsute/mal4j/MangaTests/TestManga.java +++ b/src/test/java/dev/katsute/mal4j/MangaTests/TestManga.java @@ -4,8 +4,10 @@ import dev.katsute.mal4j.MyAnimeList; import dev.katsute.mal4j.TestProvider; import dev.katsute.mal4j.manga.Manga; +import dev.katsute.mal4j.manga.RelatedManga; import dev.katsute.mal4j.manga.property.MangaPublishStatus; import dev.katsute.mal4j.manga.property.MangaType; +import dev.katsute.mal4j.property.RelationType; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -144,6 +146,9 @@ final void testEnum(){ assertEquals(MangaPublishStatus.Unknown, MangaPublishStatus.asEnum("?")); assertEquals(MangaType.Unknown, MangaType.asEnum("?")); + for(final RelatedManga relatedManga : mal.getManga(112589).getRelatedManga()) + assertNotEquals(RelationType.Unknown, relatedManga.getRelationType(), "Unknown type: " + relatedManga.getRawRelationType()); + assumeTrue(MangaPublishStatus.OnHiatus == mal.getManga(2).getStatus(), "Test will fail when status is not hiatus"); }