Package cucumber.runtime

Examples of cucumber.runtime.FeatureBuilder


                }
            }
        }

        final List<CucumberFeature> cucumberFeatures = new ArrayList<CucumberFeature>();
        final FeatureBuilder builder = new FeatureBuilder(cucumberFeatures);

        final List<Object> filters = createFilters(testInstance);

        final InputStream featuresIs = tccl.getResourceAsStream(ClientServerFiles.FEATURES_LIST);
        if (featuresIs != null) {
            final BufferedReader reader = new BufferedReader(new InputStreamReader(featuresIs));
            String line;

            while ((line = reader.readLine()) != null) {
                line = line.trim();
                if (line.isEmpty()) {
                    continue;
                }

                final Set<Object> resourceFilters = new HashSet<Object>(filters);
                final PathWithLines pathWithLines = new PathWithLines(line);
                resourceFilters.addAll(pathWithLines.lines);
                builder.parse(new ClassLoaderResource(tccl, pathWithLines.path), new ArrayList<Object>(resourceFilters));
            }
        } else { // client side
            for (final Map.Entry<String, Collection<URL>> entry : Features.createFeatureMap(CucumberConfiguration.instance().getTempDir(), cukespaceConfig.getProperty(CucumberConfiguration.FEATURE_HOME), clazz, tccl).entrySet()) {
                final PathWithLines pathWithLines = new PathWithLines(entry.getKey());
                final Set<Object> resourceFilters = new HashSet<Object>(filters);
                resourceFilters.addAll(pathWithLines.lines);
                for (final URL url : entry.getValue()) {
                    builder.parse(new URLResource(pathWithLines.path, url), new ArrayList<Object>(resourceFilters));
                }
            }
        }

        if (cucumberFeatures.isEmpty()) {
View Full Code Here

TOP

Related Classes of cucumber.runtime.FeatureBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.