Skip to content

Commit

Permalink
Merge branch 'dev' into #343_suggest_change_and_log
Browse files Browse the repository at this point in the history
  • Loading branch information
fmendezh committed May 25, 2021
2 parents be609ea + 5da1175 commit 244bd3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.supercsv.cellprocessor.Optional;
import org.supercsv.cellprocessor.ParseEnum;
import org.supercsv.cellprocessor.ParseInt;
import org.supercsv.cellprocessor.ParseLong;
import org.supercsv.cellprocessor.ift.CellProcessor;
import org.supercsv.io.CsvBeanWriter;
import org.supercsv.io.ICsvBeanWriter;
Expand Down Expand Up @@ -77,8 +78,8 @@ public static CsvWriter<DownloadStatistics> downloadStatisticsCsvWriter(Iterable
.fields(new String[]{"datasetKey", "totalRecords", "numberDownloads", "year", "month"})
.header(new String[]{"dataset_key", "total_records", "number_downloads", "year", "month"})
.processors(new CellProcessor[]{new UUIDProcessor(), //datasetKey
new Optional(new ParseInt()), //totalRecords
new Optional(new ParseInt()), //numberDowloads
new Optional(new ParseLong()), //totalRecords
new Optional(new ParseLong()), //numberDowloads
new Optional(new ParseInt()), //year
new Optional(new ParseInt()) //month
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public void downloadStatisticsTest() {

//Test data
List<DownloadStatistics> stats = Arrays.asList(
new DownloadStatistics(UUID.randomUUID(), 10, 10, LocalDate.of(2020,1,1)),
new DownloadStatistics(UUID.randomUUID(), 10, 10, LocalDate.of(2021, 2,1)));
new DownloadStatistics(UUID.randomUUID(), 10L, 10L, LocalDate.of(2020,1,1)),
new DownloadStatistics(UUID.randomUUID(), 10L, 10L, LocalDate.of(2021, 2,1)));

StringWriter writer = new StringWriter();

Expand Down

0 comments on commit 244bd3f

Please sign in to comment.