@Before public void setup() { JobDefinitionResource jobDefinitionResource = new JobDefinitionResource(jobDefinitionService); this.restJobDefinitionMockMvc = MockMvcBuilders.standaloneSetup(jobDefinitionResource).build(); ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JodaModule()); objectMapper.configure(com.fasterxml.jackson.databind.SerializationFeature. WRITE_DATES_AS_TIMESTAMPS, false); JacksonTester.initFields(this, objectMapper); }
@Before public void setup() { JobExecutionHistoryResource jobExecutionHistoryResource = new JobExecutionHistoryResource(jobExecutionHistoryService); restJobExecutionHistoryMockMvc = MockMvcBuilders.standaloneSetup(jobExecutionHistoryResource).build(); ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JodaModule()); objectMapper.configure(com.fasterxml.jackson.databind.SerializationFeature. WRITE_DATES_AS_TIMESTAMPS, false); JacksonTester.initFields(this, objectMapper); }
@Before public void setup() throws ServletException { ObjectMapper objectMapper = new ObjectMapper(); JacksonTester.initFields(this, objectMapper); mvc = webAppContextSetup(wac) .apply(springSecurity()) .build(); azTestFileName = applicationSettings.getPostAtoZFilePath() + environment.getProperty("posts.az.file.name"); }
@Before public void setUpMockMVC() { mockMvc = webAppContextSetup(webApplicationContext) .apply(springSecurity()) .build(); JacksonTester.initFields(this, new ObjectMapper()); }
@Override public void setUp() { final SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(TagName.class, new TagNameSerializer()); objectMapper.registerModule(simpleModule); objectMapper.addMixIn(WidgetDatasource.class, WidgetDatasourceMixins.class); objectMapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }
@Override public void setUp() { final SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(TagName.class, new TagNameSerializer()); objectMapper.registerModule(simpleModule); objectMapper.addMixIn(Widget.class, WidgetMixins.class); objectMapper.addMixIn(WidgetDatasource.class, WidgetDatasourceMixins.class); json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }
@Before public void setup() { JacksonTester.initFields(this, new ObjectMapper()); }
@Bean @Primary public JacksonTester<JsonNode> jacksonTester(ObjectMapper objectMapper) { return new JacksonTester<>( ODataIntegrationTest.class, ResolvableType.forClass(JsonNode.class), objectMapper); }
@Override public void setUp() { objectMapper.addMixIn(FieldInfo.class, FieldInfoConfigMixins.class); objectMapper.addMixIn(FieldValue.class, FieldValueConfigMixins.class); json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }
protected void setUpObjectMapper() { objectMapper.registerModule(new JavaTimeModule()); json = new JacksonTester<>(getClass(), ResolvableType.forClass(object.getClass()), objectMapper); }
@Override public void setUpObjectMapper() { json = new JacksonTester<>(getClass(), ResolvableType.forClass(TagName.class), springObjectMapper); }
@Override public void initialize(TestContext testContext, ObjectFactory<ObjectMapper> marshaller) { JacksonTester.initFields(testContext.getTestInstance(), marshaller); }
@Before public void setup() { JacksonTester.initFields(this, objectMapper); }
@Before public void setup() { ObjectMapper objectMappper = new ObjectMapper(); // Possibly configure the mapper JacksonTester.initFields(this, objectMappper); }
@Before public void setup() throws IOException { ObjectMapper objectMappper = new ObjectMapper(); // Possibly configure the mapper JacksonTester.initFields(this, objectMappper); }
@Override public void setUp() { final ObjectMapper objectMapper = new ObjectMapper(); objectMapper.addMixIn(WidgetDatasource.class, WidgetDatasourceMixins.class); json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }
@Override public void setUp() { json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }
@Before public void setUp() { final ObjectMapper objectMapper = new ObjectMapper(); json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper); }