@Test public void testValidFileNamePart() { assertThat(validFileNamePart("")).isTrue(); assertThat(validFileNamePart("Hello World!")).isTrue(); assertThat(validFileNamePart(File.separator)).isFalse(); assertThat(validFileNamePart("/foo\\")).isFalse(); }
public static boolean validFileNamePart(final String part) { return part == null || part.isEmpty() || !part.contains(File.separator); }
FileValidationUtils { public static boolean validFileNamePart(final String part) { return part == null || part.isEmpty() || !part.contains(File.separator); } }
FileValidationUtils { public static boolean validFileNamePart(final String part) { return part == null || part.isEmpty() || !part.contains(File.separator); } private  FileValidationUtils(); }
FileValidationUtils { public static boolean validFileNamePart(final String part) { return part == null || part.isEmpty() || !part.contains(File.separator); } private  FileValidationUtils(); static boolean validFileNamePart(final String part); }
FileValidationUtils { public static boolean validFileNamePart(final String part) { return part == null || part.isEmpty() || !part.contains(File.separator); } private  FileValidationUtils(); static boolean validFileNamePart(final String part);  }