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

net.masterthought.cucumber.json.deserializers.CucumberJsonDeserializer Maven / Gradle / Ivy

Go to download

Provides pretty html reports for Cucumber (Behaviour-Driven Development). It works by generating html from the cucumber json report formatter. So can be used anywhere a json report is generated. Current use is in the cucumber jenkins plugin and a maven mojo to generate the same report from mvn command line when running locally.

There is a newer version: 5.8.6
Show newest version
package net.masterthought.cucumber.json.deserializers;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import net.masterthought.cucumber.Configuration;

/**
 * Abstract deserializer that extracts {@link Configuration} and passes to
 * {@link #deserialize(JsonParser, Configuration)}.
 * 
 * @author Damian Szczepanik (damianszczepanik@github)
 */
abstract class CucumberJsonDeserializer extends JsonDeserializer {

    @Override
    public T deserialize(JsonParser parser, DeserializationContext context)
            throws IOException, JsonProcessingException {
        Configuration configuration = (Configuration) context.findInjectableValue(Configuration.class.getName(), null,
                null);
        return deserialize(parser, configuration);
    }

    protected abstract T deserialize(JsonParser parser, Configuration configuration)
            throws IOException, JsonProcessingException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy