Skip to content

Commit

Permalink
Add missing RelationType Adaptation (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute authored Dec 10, 2024
1 parent 464447e commit 9fba81e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.katsute</groupId>
<artifactId>mal4j</artifactId>
<version>3.4.2</version>
<version>3.4.3</version>

<profiles>
<profile>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/dev/katsute/mal4j/property/RelationType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"),
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/dev/katsute/mal4j/MangaTests/TestManga.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}

Expand Down

0 comments on commit 9fba81e

Please sign in to comment.