All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ecfeed.junit.runner.web.ServiceObjectMapper Maven / Gradle / Ivy

Go to download

An open library used to connect to the ecFeed service. It can be also used as a standalone testing tool. It is integrated with Junit5 and generates a stream of test cases using a selected algorithm (e.g. Cartesian, N-Wise). There are no limitations associated with the off-line version but the user cannot access the on-line computation servers and the model database.

The newest version!
package com.ecfeed.junit.runner.web;

import com.ecfeed.core.utils.ExceptionHelper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

// TODO - move to core ?
public class ServiceObjectMapper {

    public String mapRequestToString(Object request) {

        ObjectMapper fMapper = new ObjectMapper();

        try {
            return fMapper.writer().writeValueAsString(request);

        } catch (JsonProcessingException e) {
            ExceptionHelper.reportRuntimeException("Cannot convert request to string.", e);
            return null;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy