Improve chapter recognition.

This commit is contained in:
inorichi
2016-01-14 17:45:32 +01:00
parent 4ee95140e6
commit 24a0a3b96f
4 changed files with 42 additions and 18 deletions

View File

@@ -121,4 +121,18 @@ public class ChapterRecognitionTest {
assertThat(c.chapter_number).isEqualTo(84f);
}
@Test
public void testWithVersionBeforeAndAnotherNumber() {
Chapter c = createChapter("Onepunch-Man Punch Ver002 086 : Creeping Darkness [3]");
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(86f);
}
@Test
public void testWithVolumeAfterChapter() {
Chapter c = createChapter("Solanin 028 Vol. 2");
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(28f);
}
}