OverrideTools { public static boolean checkOverwriteEpisodePlot(MovieFile movieFile, int part, String source) { if (!INCLUDE_EPISODE_PLOT) { return Boolean.FALSE; } else if (skipCheck(movieFile, OverrideFlag.EPISODE_PLOT, source)) { return Boolean.FALSE; } else if (StringTools.isNotValidString(movieFile.getPlot(part))) { return Boolean.TRUE; } return checkOverwrite(movieFile, OverrideFlag.EPISODE_PLOT, source); } private  OverrideTools(); static void putMoviePriorities(OverrideFlag overrideFlag, String sources); static void putTvPriorities(OverrideFlag overrideFlag, String sources); static void putMoviePersonPriorities(OverrideFlag overrideFlag, String sources); static void putTvPersonPriorities(OverrideFlag overrideFlag, String sources); static boolean checkOneOverwrite(Movie movie, String source, OverrideFlag... overrideFlags); static boolean checkOverwriteActors(Movie movie, String source); static boolean checkOverwriteAspectRatio(Movie movie, String source); static boolean checkOverwriteCertification(Movie movie, String source); static boolean checkOverwriteCompany(Movie movie, String source); static boolean checkOverwriteContainer(Movie movie, String source); static boolean checkOverwriteCountry(Movie movie, String source); static boolean checkOverwriteDirectors(Movie movie, String source); static boolean checkOverwriteGenres(Movie movie, String source); static boolean checkOverwriteFPS(Movie movie, String source); static boolean checkOverwriteLanguage(Movie movie, String source); static boolean checkOverwriteOriginalTitle(Movie movie, String source); static boolean checkOverwriteOutline(Movie movie, String source); static boolean checkOverwritePlot(Movie movie, String source); static boolean checkOverwriteQuote(Movie movie, String source); static boolean checkOverwriteReleaseDate(Movie movie, String source); static boolean checkOverwriteResolution(Movie movie, String source); static boolean checkOverwriteRuntime(Movie movie, String source); static boolean checkOverwriteTagline(Movie movie, String source); static boolean checkOverwriteTitle(Movie movie, String source); static boolean checkOverwriteTop250(Movie movie, String source); static boolean checkOverwriteVideoOutput(Movie movie, String source); static boolean checkOverwriteVideoSource(Movie movie, String source); static boolean checkOverwriteWriters(Movie movie, String source); static boolean checkOverwriteYear(Movie movie, String source); static boolean checkOverwritePeopleActors(Movie movie, String source); static boolean checkOverwritePeopleDirectors(Movie movie, String source); static boolean checkOverwritePeopleWriters(Movie movie, String source); static boolean checkOverwriteEpisodeFirstAired(MovieFile movieFile, int part, String source); static boolean checkOverwriteEpisodePlot(MovieFile movieFile, int part, String source); static boolean checkOverwriteEpisodeRating(MovieFile movieFile, int part, String source); static boolean checkOverwriteEpisodeTitle(MovieFile movieFile, int part, String source);  }
@Test public void testFilePriority1() { LOG.info("FilePriority1"); MovieFile file = new MovieFile(); if (OverrideTools.checkOverwriteEpisodePlot(file, 1, "imdb")) { file.setPlot(1, "123", "imdb"); } assertEquals("123", file.getPlot(1)); if (OverrideTools.checkOverwriteEpisodePlot(file, 1, "nfo")) { file.setPlot(1, "456", "nfo"); } assertEquals("456", file.getPlot(1)); }
@Test public void testFilePriority2() { LOG.info("FilePriority2"); MovieFile file = new MovieFile(); if (OverrideTools.checkOverwriteEpisodePlot(file, 1, "nfo")) { file.setPlot(1, "123", "nfo"); } assertEquals("123", file.getPlot(1)); if (OverrideTools.checkOverwriteEpisodePlot(file, 1, "imdb")) { file.setPlot(1, "456", "imdb"); } assertEquals("123", file.getPlot(1)); }