@Test public void thatNullLanguageNameResultsInUnknownLanguage() { LanguageStats languageStats = new LanguageStats(null, null, null); assertThat(languageStats.getLanguageName(), is("unknown")); }
@JsonProperty(value="name") public String getLanguageName() { return languageName; }
LanguageStats { @JsonProperty(value="name") public String getLanguageName() { return languageName; } }
LanguageStats { @JsonProperty(value="name") public String getLanguageName() { return languageName; } LanguageStats(String languageName, List<Integer> projectCounts, List<Date> snapshotDates); }
LanguageStats { @JsonProperty(value="name") public String getLanguageName() { return languageName; } LanguageStats(String languageName, List<Integer> projectCounts, List<Date> snapshotDates); static List<LanguageStats> buildStats(List<Project> projectList); static List<Project> filterUniqueSnapshots(List<Project> projects); @JsonProperty(value="name") String getLanguageName(); @JsonProperty(value="project_counts") List<Integer> getProjectCounts(); @JsonProperty(value="snapshot_dates") @JsonSerialize(using = JsonDateListSerializer.class) List<Date> getSnapshotDates(); }
LanguageStats { @JsonProperty(value="name") public String getLanguageName() { return languageName; } LanguageStats(String languageName, List<Integer> projectCounts, List<Date> snapshotDates); static List<LanguageStats> buildStats(List<Project> projectList); static List<Project> filterUniqueSnapshots(List<Project> projects); @JsonProperty(value="name") String getLanguageName(); @JsonProperty(value="project_counts") List<Integer> getProjectCounts(); @JsonProperty(value="snapshot_dates") @JsonSerialize(using = JsonDateListSerializer.class) List<Date> getSnapshotDates(); static String UNKNOWN; }