mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2025-12-31 06:33:16 +09:00
#55 fixed mockMvcTests
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
package it.fabioformosa.quartzmanager.controllers.utils;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.util.StdDateFormat;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
public class TestUtils {
|
||||
|
||||
static public ObjectMapper objectMapper = new ObjectMapper();
|
||||
static public ObjectMapper objectMapper = new ObjectMapper();
|
||||
static{
|
||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
objectMapper.setDateFormat(new StdDateFormat().withColonInTimeZone(true)); // StdDateFormat is ISO8601 since jackson 2.9
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
static public String toJson(Object object){
|
||||
|
||||
Reference in New Issue
Block a user