package net.knarcraft.ffmpegconverter.utility; import org.junit.Test; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; public class SubtitleHelperTest { @Test public void isSignsSongsSubtitlePositiveTest() { assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Sign")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Song")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs & Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs & Signs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Sings & Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs & Sings")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs/Titles/Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs@")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Sings & Songs@")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs & Sings -")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs/Titles/Songs bla bla (bla)")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("English (Signs/Titles/Songs)")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Forced")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs / Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs / Signs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs/Lyrics")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("English [Signs/Lyrics]")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Forced Subtitles")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Some Text Signs & Songs")); assertTrue(SubtitleHelper.isSongsSignsSubtitle("Some Text Songs & Signs")); } @Test public void isSignsSongsSubtitleNegativeTest() { assertFalse(SubtitleHelper.isSongsSignsSubtitle("Potato")); assertFalse(SubtitleHelper.isSongsSignsSubtitle("assign")); assertFalse(SubtitleHelper.isSongsSignsSubtitle("signed")); assertFalse(SubtitleHelper.isSongsSignsSubtitle("English")); assertFalse(SubtitleHelper.isSongsSignsSubtitle("Full subtitle")); assertFalse(SubtitleHelper.isSongsSignsSubtitle("Dialogue")); } }