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

net.masterthought.cucumber.reducers.ReportFeatureMergerFactory Maven / Gradle / Ivy

Go to download

Provides pretty html reports for Cucumber. It works by generating html from the cucumber json file.

There is a newer version: 5.8.2
Show newest version
package net.masterthought.cucumber.reducers;

import java.util.Arrays;
import java.util.List;
import java.util.Optional;

import static java.util.Collections.emptyList;

public final class ReportFeatureMergerFactory {

    private List mergers = Arrays.asList(
            new ReportFeatureByIdMerger(),
            new ReportFeatureWithRetestMerger()
    );

    /**
     * @param reducingMethods - full list of reduce methods.
     * @return a merger for features by ReduceMethod with a priority mentioned in the method.
     */
    public ReportFeatureMerger get(List reducingMethods) {
        List methods = Optional.ofNullable(reducingMethods).orElse(emptyList());
        return mergers.stream()
                .filter(m -> m.test(methods))
                .findFirst()
                .orElse(new ReportFeatureAppendableMerger());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy