@Test(expected = SRTEditorException.class) public void testUpdateTextInvalidSubtitleNumber() throws Exception { SRTInfo srtInfo = new SRTInfo(); srtInfo.add(new SRT(1, SRTTimeFormat.parse("00:00:24,600"), SRTTimeFormat.parse("00:00:26,600"), "Hello!!! This is a very long string.", "Ain't it cool??? :)")); srtInfo.add(new SRT(2, SRTTimeFormat.parse("00:11:24,600"), SRTTimeFormat.parse("00:12:26,600"), "Hello!!! There is really nothing to see here.", "Foo Bar.", "Bye World.")); SRTEditor.updateText(srtInfo, 100, 15); }
public static void updateText(SRTInfo info, int subtitleNumber, int width) { if (!info.contains(subtitleNumber)) { throw new SRTEditorException(subtitleNumber + " could not be found"); } info.add(breakText(info.get(subtitleNumber), width)); }
SRTEditor { public static void updateText(SRTInfo info, int subtitleNumber, int width) { if (!info.contains(subtitleNumber)) { throw new SRTEditorException(subtitleNumber + " could not be found"); } info.add(breakText(info.get(subtitleNumber), width)); } }
SRTEditor { public static void updateText(SRTInfo info, int subtitleNumber, int width) { if (!info.contains(subtitleNumber)) { throw new SRTEditorException(subtitleNumber + " could not be found"); } info.add(breakText(info.get(subtitleNumber), width)); } private  SRTEditor(); }
SRTEditor { public static void updateText(SRTInfo info, int subtitleNumber, int width) { if (!info.contains(subtitleNumber)) { throw new SRTEditorException(subtitleNumber + " could not be found"); } info.add(breakText(info.get(subtitleNumber), width)); } private  SRTEditor(); static void updateTime(SRTInfo info, int subtitleNumber,
        SRTTimeFormat.Type type, int value); static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value); static void updateText(SRTInfo info, int subtitleNumber, int width); static void updateTexts(SRTInfo info, int width); static void appendSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void prependSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void insertSubtitle(SRTInfo info, int subtitleNumber,
        String startTime, String endTime, List<String> text); static void insertSubtitle(SRTInfo info, SRT newSRT); static void removeSubtitle(SRTInfo info, int subtitleNumber); static void updateSubtitle(SRTInfo info, SRT srt); }
SRTEditor { public static void updateText(SRTInfo info, int subtitleNumber, int width) { if (!info.contains(subtitleNumber)) { throw new SRTEditorException(subtitleNumber + " could not be found"); } info.add(breakText(info.get(subtitleNumber), width)); } private  SRTEditor(); static void updateTime(SRTInfo info, int subtitleNumber,
        SRTTimeFormat.Type type, int value); static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value); static void updateText(SRTInfo info, int subtitleNumber, int width); static void updateTexts(SRTInfo info, int width); static void appendSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void prependSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void insertSubtitle(SRTInfo info, int subtitleNumber,
        String startTime, String endTime, List<String> text); static void insertSubtitle(SRTInfo info, SRT newSRT); static void removeSubtitle(SRTInfo info, int subtitleNumber); static void updateSubtitle(SRTInfo info, SRT srt);  }