1

added deserialization tests

This commit is contained in:
Christoph
2020-03-10 15:59:09 +01:00
parent c508c900d1
commit 66a6b9a137
2 changed files with 47 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import mops.gruppen2.domain.event.Event;
import mops.gruppen2.repository.EventRepository;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class EventService {
private final SerializationService serializationService;
@ -48,4 +50,18 @@ public class EventService {
}
return tmpId;
}
public List<EventDTO> findAllEvents() {
return null;
}
public Event getEvent(EventDTO eventDTO) {
try {
return serializationService.deserializeEvent(eventDTO.getEvent_payload());
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return null;
}
}