
website.automate.waml.io.mappers.ScenarioMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of waml-io Show documentation
Show all versions of waml-io Show documentation
(De)Serializer of the web automation markup language (WAML) for Java
The newest version!
package website.automate.waml.io.mappers;
import com.fasterxml.jackson.databind.ObjectMapper;
import website.automate.waml.io.model.main.Scenario;
public class ScenarioMapper {
private ObjectMapper objectMapper;
public ScenarioMapper(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
public Scenario map(Scenario action) {
try {
return objectMapper.readValue(objectMapper.writeValueAsString(action),
action.getClass());
} catch (Exception e) {
throw new RuntimeException("Can't map scenario!", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy