use of cucumber.runtime.model.FeatureLoader in project page-factory-2 by sbtqa.
the class FragmentCacheUtils method cacheFragmentsToFeatures.
static List<CucumberFeature> cacheFragmentsToFeatures(Class clazz, List<CucumberFeature> features) {
if (PROPERTIES.getFragmentsPath().isEmpty()) {
return features;
} else {
ClassLoader classLoader = clazz.getClassLoader();
ResourceLoader resourceLoader = new MultiLoader(classLoader);
List<CucumberFeature> fragmentsRaw = new FeatureLoader(resourceLoader).load(Collections.singletonList(FeaturePath.parse(PROPERTIES.getFragmentsPath())));
return Stream.concat(features.stream(), fragmentsRaw.stream()).collect(Collectors.toList());
}
}
Aggregations