Java 类org.springframework.boot.test.json.JacksonTester 实例源码

项目:cronit-repository    文件:JobDefinitionResourceTest.java   
@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);
}
项目:cronit-repository    文件:JobExecutionHistoryResourceTest.java   
@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);
}
项目:nixmash-blog    文件:AdminPostsControllerTests.java   
@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");
}
项目:SSMSeedProject    文件:UserResourceSteps.java   
@Before
public void setUpMockMVC() {
    mockMvc = webAppContextSetup(webApplicationContext)
            .apply(springSecurity())
            .build();
    JacksonTester.initFields(this, new ObjectMapper());
}
项目:SSMSeedProject    文件:AddressTest.java   
@Before
public void setUpMockMVC() {
    mockMvc = webAppContextSetup(webApplicationContext)
            .apply(springSecurity())
            .build();
    JacksonTester.initFields(this, new ObjectMapper());
}
项目:SSMSeedProject    文件:UserTest.java   
@Before
public void setUpMockMVC() {
    mockMvc = webAppContextSetup(webApplicationContext)
            .apply(springSecurity())
            .build();
    JacksonTester.initFields(this, new ObjectMapper());
}
项目:find    文件:ComplexWidgetTest.java   
@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);
}
项目:find    文件:DashboardTest.java   
@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);
}
项目:tifoon    文件:NetworkResultTest.java   
@Before
public void setup() {
    JacksonTester.initFields(this, new ObjectMapper());
}
项目:odata-spring-boot-starter    文件:ODataIntegrationTest.java   
@Bean
@Primary
public JacksonTester<JsonNode> jacksonTester(ObjectMapper objectMapper) {
  return new JacksonTester<>(
      ODataIntegrationTest.class, ResolvableType.forClass(JsonNode.class), objectMapper);
}
项目:haven-search-components    文件:FieldsInfoTest.java   
@Override
public void setUp() {
    objectMapper.addMixIn(FieldInfo.class, FieldInfoConfigMixins.class);
    objectMapper.addMixIn(FieldValue.class, FieldValueConfigMixins.class);
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}
项目:haven-search-components    文件:SimpleResponseObjectTest.java   
protected void setUpObjectMapper() {
    objectMapper.registerModule(new JavaTimeModule());
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(object.getClass()), objectMapper);
}
项目:haven-search-components    文件:TagNameTest.java   
@Override
public void setUpObjectMapper() {
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(TagName.class), springObjectMapper);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JsonTesterInitializationTestExecutionListener.java   
@Override
public void initialize(TestContext testContext,
        ObjectFactory<ObjectMapper> marshaller) {
    JacksonTester.initFields(testContext.getTestInstance(), marshaller);
}
项目:site    文件:PostApiControllerTest.java   
@Before
public void setup() {
    JacksonTester.initFields(this, objectMapper);
}
项目:site    文件:EventApiControllerTest.java   
@Before
public void setup() {
    JacksonTester.initFields(this, objectMapper);
}
项目:spring-cloud-contract-samples    文件:AbstractTest.java   
@Before
public void setup() {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-cloud-contract-samples    文件:AbstractTest.java   
@Before
public void setup() {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-cloud-contract-samples    文件:ProducerControllerTests.java   
@Before
public void setup() {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-cloud-contract-samples    文件:AbstractTest.java   
@Before
public void setup() {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-cloud-contract-samples    文件:AbstractTest.java   
@Before
public void setup() {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-cloud-contract-samples    文件:AbstractTest.java   
@Before
public void setup() throws IOException {
    ObjectMapper objectMappper = new ObjectMapper();
    // Possibly configure the mapper
    JacksonTester.initFields(this, objectMappper);
}
项目:spring-boot-concourse    文件:JsonTesterInitializationTestExecutionListener.java   
@Override
public void initialize(TestContext testContext,
        ObjectFactory<ObjectMapper> marshaller) {
    JacksonTester.initFields(testContext.getTestInstance(), marshaller);
}
项目:site    文件:PostApiControllerTest.java   
@Before
public void setup() {
    JacksonTester.initFields(this, objectMapper);
}
项目:site    文件:EventApiControllerTest.java   
@Before
public void setup() {
    JacksonTester.initFields(this, objectMapper);
}
项目:find    文件:DatasourceDependentWidgetTest.java   
@Override
public void setUp() {
    final ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.addMixIn(WidgetDatasource.class, WidgetDatasourceMixins.class);
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}
项目:find    文件:TrendingConfigurationTest.java   
@Override
public void setUp() {
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}
项目:find    文件:UiCustomizationTest.java   
@Override
public void setUp() {
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}
项目:find    文件:TemplatesConfigTest.java   
@Override
public void setUp() {
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}
项目:java-configuration-impl    文件:ConfigurationComponentTest.java   
@Before
public void setUp() {
    final ObjectMapper objectMapper = new ObjectMapper();
    json = new JacksonTester<>(getClass(), ResolvableType.forClass(getType()), objectMapper);
}