@Test public void testToYearFormat() { int firstYear = 0; int secondYear = 0; assertEquals(FeedRow.toYearFormat(firstYear, secondYear), "0/0"); firstYear = -5; secondYear = -30; assertEquals(FeedRow.toYearFormat(firstYear, secondYear), "-5/-30"); firstYear = 2000; secondYear = -30; assertEquals(FeedRow.toYearFormat(firstYear, secondYear), "2000/-30"); }
public static String toYearFormat(int startYear, int endYear) { return String.format("%d/%d", startYear, endYear); }
FeedRow { public static String toYearFormat(int startYear, int endYear) { return String.format("%d/%d", startYear, endYear); } }
FeedRow { public static String toYearFormat(int startYear, int endYear) { return String.format("%d/%d", startYear, endYear); } FeedRow();  FeedRow(String imageUrl,
                   String title,
                   String description,
                   String location,
                   String year,
                   List<String> tagList,
                   String favoriteCount,
                   boolean isFavorite,
                   String creatorUsername); }
FeedRow { public static String toYearFormat(int startYear, int endYear) { return String.format("%d/%d", startYear, endYear); } FeedRow();  FeedRow(String imageUrl,
                   String title,
                   String description,
                   String location,
                   String year,
                   List<String> tagList,
                   String favoriteCount,
                   boolean isFavorite,
                   String creatorUsername); static String toYearFormat(int startYear, int endYear); static int[] fromYearFormat(String yearFormat); String getImageUrl(); void setImageUrl(String imageUrl); String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getLocation(); void setLocation(String location); String getYear(); void setYear(String year); void setTagList(List<String> tagList); List<String> getTagList(); String getFavoriteCount(); void setFavoriteCount(String favoriteCount); String getCreatorUsername(); void setCreatorUsername(String creatorUsername); boolean isFavorite(); void setFavorite(boolean favorite); }
FeedRow { public static String toYearFormat(int startYear, int endYear) { return String.format("%d/%d", startYear, endYear); } FeedRow();  FeedRow(String imageUrl,
                   String title,
                   String description,
                   String location,
                   String year,
                   List<String> tagList,
                   String favoriteCount,
                   boolean isFavorite,
                   String creatorUsername); static String toYearFormat(int startYear, int endYear); static int[] fromYearFormat(String yearFormat); String getImageUrl(); void setImageUrl(String imageUrl); String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getLocation(); void setLocation(String location); String getYear(); void setYear(String year); void setTagList(List<String> tagList); List<String> getTagList(); String getFavoriteCount(); void setFavoriteCount(String favoriteCount); String getCreatorUsername(); void setCreatorUsername(String creatorUsername); boolean isFavorite(); void setFavorite(boolean favorite);  }