// Path: gepard-gherkin-jbehave/src/main/java/com/epam/gepard/gherkin/jbehave/helper/IOUtils.java
// public class IOUtils {
// 
//     /**
//      * Get the contents of an InputStream as a String using the default character encoding of the platform.
//      * This method buffers the input internally, so there is no need to use a BufferedInputStream.
//      * @param inputStream the InputStream to read from
//      * @return the contents of the inputStream
//      * @throws IOException - if an I/O error occurs
//      */
//     public String toString(final InputStream inputStream) throws IOException {
//         return org.apache.commons.io.IOUtils.toString(inputStream);
//     }
// }
// 
// Path: gepard-gherkin-jbehave/src/main/java/com/epam/gepard/gherkin/jbehave/helper/ResourceProvider.java
// public class ResourceProvider {
// 
//     /**
//      * Returns the resource with the given path from the classpath.
//      * @param path the given path of the resource
//      * @return an {@link InputStream} of the resource, or null if not found
//      */
//     public InputStream getResourceAsStream(final String path) {
//         return getClass().getClassLoader().getResourceAsStream(path);
//     }
// 
// }


import com.epam.gepard.gherkin.jbehave.helper.ResourceProvider;
import com.epam.gepard.util.Util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import com.epam.gepard.logger.HtmlRunReporter;
import org.jbehave.core.model.Story;
import org.jbehave.core.reporters.NullStoryReporter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.epam.gepard.gherkin.jbehave.helper.IOUtils;
package com.epam.gepard.gherkin.jbehave;

/*==========================================================================
Copyright 2004-2015 EPAM Systems

This file is part of Gepard.

Gepard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gepard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gepard.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/




/**
 * Used for logging the events of the test case.
 * @author Adam_Csaba_Kiraly
 */
public class JBehaveStoryReporter extends NullStoryReporter {

    private static final String COULD_NOT_READ_FILE = "Could not read file: ";
    private static final String FILE_NOT_FOUND = "File not found: ";
    private static final String AFTER_STORIES_PATH = "AfterStories";
    private static final String BEFORE_STORIES_PATH = "BeforeStories";
    private static final Logger LOGGER = LoggerFactory.getLogger(JBehaveStoryReporter.class);
    private final JBehaveTestCase jBehaveTestCase;
    private final Util util = new Util();
// Path: gepard-gherkin-jbehave/src/main/java/com/epam/gepard/gherkin/jbehave/helper/IOUtils.java
// public class IOUtils {
// 
//     /**
//      * Get the contents of an InputStream as a String using the default character encoding of the platform.
//      * This method buffers the input internally, so there is no need to use a BufferedInputStream.
//      * @param inputStream the InputStream to read from
//      * @return the contents of the inputStream
//      * @throws IOException - if an I/O error occurs
//      */
//     public String toString(final InputStream inputStream) throws IOException {
//         return org.apache.commons.io.IOUtils.toString(inputStream);
//     }
// }
// 
// Path: gepard-gherkin-jbehave/src/main/java/com/epam/gepard/gherkin/jbehave/helper/ResourceProvider.java
// public class ResourceProvider {
// 
//     /**
//      * Returns the resource with the given path from the classpath.
//      * @param path the given path of the resource
//      * @return an {@link InputStream} of the resource, or null if not found
//      */
//     public InputStream getResourceAsStream(final String path) {
//         return getClass().getClassLoader().getResourceAsStream(path);
//     }
// 
// }


// Path: gepard-gherkin-jbehave/src/main/java/com/epam/gepard/gherkin/jbehave/JBehaveStoryReporter.java
import com.epam.gepard.gherkin.jbehave.helper.ResourceProvider;
import com.epam.gepard.util.Util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import com.epam.gepard.logger.HtmlRunReporter;
import org.jbehave.core.model.Story;
import org.jbehave.core.reporters.NullStoryReporter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.epam.gepard.gherkin.jbehave.helper.IOUtils;

package com.epam.gepard.gherkin.jbehave;

/*==========================================================================
Copyright 2004-2015 EPAM Systems

This file is part of Gepard.

Gepard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gepard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gepard.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/




/**
 * Used for logging the events of the test case.
 * @author Adam_Csaba_Kiraly
 */
public class JBehaveStoryReporter extends NullStoryReporter {

    private static final String COULD_NOT_READ_FILE = "Could not read file: ";
    private static final String FILE_NOT_FOUND = "File not found: ";
    private static final String AFTER_STORIES_PATH = "AfterStories";
    private static final String BEFORE_STORIES_PATH = "BeforeStories";
    private static final Logger LOGGER = LoggerFactory.getLogger(JBehaveStoryReporter.class);
    private final JBehaveTestCase jBehaveTestCase;
    private final Util util = new Util();
    private final IOUtils ioUtils = new IOUtils();