@Test public void convertTest() { HabitStatistic habitStatistic = ModelUtils.getHabitStatistic(); AddHabitStatisticDto expected = AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); assertEquals(expected, addHabitStatisticDtoMapper.convert(habitStatistic)); }
@Override protected AddHabitStatisticDto convert(HabitStatistic habitStatistic) { return AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); }
AddHabitStatisticDtoMapper extends AbstractConverter<HabitStatistic, AddHabitStatisticDto> { @Override protected AddHabitStatisticDto convert(HabitStatistic habitStatistic) { return AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); } }
AddHabitStatisticDtoMapper extends AbstractConverter<HabitStatistic, AddHabitStatisticDto> { @Override protected AddHabitStatisticDto convert(HabitStatistic habitStatistic) { return AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); }  }
AddHabitStatisticDtoMapper extends AbstractConverter<HabitStatistic, AddHabitStatisticDto> { @Override protected AddHabitStatisticDto convert(HabitStatistic habitStatistic) { return AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); }   }
AddHabitStatisticDtoMapper extends AbstractConverter<HabitStatistic, AddHabitStatisticDto> { @Override protected AddHabitStatisticDto convert(HabitStatistic habitStatistic) { return AddHabitStatisticDto.builder() .id(habitStatistic.getId()) .amountOfItems(habitStatistic.getAmountOfItems()) .createdOn(habitStatistic.getCreatedOn()) .habitRate(habitStatistic.getHabitRate()) .habitId(habitStatistic.getHabit().getId()) .build(); }    }