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

website.automate.waml.io.WamlWriter Maven / Gradle / Ivy

There is a newer version: 2.1.3
Show newest version
package website.automate.waml.io;

import java.io.OutputStream;
import java.util.List;

import website.automate.waml.io.model.Scenario;

import com.fasterxml.jackson.databind.ObjectMapper;

public class WamlWriter {
	
	private ObjectMapper objectMapper = WamlConfig.getInstance().getMapper();
	
	public void write(OutputStream scenarioStream, List scenarios){
        try {
            for(Scenario scenario : scenarios){
                objectMapper.writeValue(scenarioStream, scenario);
            }
        } catch (Exception e) {
            throw new WamlSerializationException("Unable to write the suite to desired format.", e);
        }
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy