| Conditions | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package easytests.api.v1.mappers; |
||
| 23 | public QuizzesMapper() { |
||
| 24 | super(); |
||
| 25 | this.createTypeMap(QuizModel.class, Quiz.class) |
||
| 26 | .addMappings(mapper -> mapper.when(context -> !(context.getSource() instanceof ModelsListEmpty)) |
||
| 27 | .<Integer>map(quizModel -> quizModel.getTestee().getId(), (quiz, id) -> quiz.getTestee().setId(id))) |
||
| 28 | .addMappings(mapper -> mapper.using(src -> ((LocalDateTime)src.getSource()).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + "Z") |
||
| 29 | .<String>map(QuizModel::getStartedAt, (quiz, startedAt) -> quiz.setStartedAt(startedAt))) |
||
| 30 | .addMappings(mapper -> mapper.using(src -> ((LocalDateTime)src.getSource()).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + "Z") |
||
| 31 | .<String>map(QuizModel::getFinishedAt, (quiz, finishedAt) -> quiz.setFinishedAt(finishedAt))); |
||
| 32 | } |
||
| 34 |