Search in sources :

Example 31 with EmbedderMonitor

use of org.jbehave.core.embedder.EmbedderMonitor in project serenity-jbehave by serenity-bdd.

the class CompositeEmbedderMonitor method mapsViewGenerationFailed.

@Override
public void mapsViewGenerationFailed(final File outputDirectory, final StoryMaps storyMaps, final Properties viewProperties, final Throwable cause) {
    logger.debug("mapsViewGenerationFailed" + outputDirectory + storyMaps + viewProperties + cause);
    final LinkedList<Exception> exceptions = new LinkedList<>();
    for (final EmbedderMonitor monitor : this.monitors) {
        try {
            monitor.mapsViewGenerationFailed(outputDirectory, storyMaps, viewProperties, cause);
        } catch (final Exception suppressed) {
            logger.error("exception during calling " + monitor.getClass() + "#mapsViewGenerationFailed", suppressed);
            exceptions.add(suppressed);
        }
    }
    processSuppressed(exceptions);
}
Also used : EmbedderMonitor(org.jbehave.core.embedder.EmbedderMonitor)

Example 32 with EmbedderMonitor

use of org.jbehave.core.embedder.EmbedderMonitor in project serenity-jbehave by serenity-bdd.

the class CompositeEmbedderMonitor method usingControls.

@Override
public void usingControls(final EmbedderControls embedderControls) {
    logger.debug("usingControls" + embedderControls);
    final LinkedList<Exception> exceptions = new LinkedList<>();
    for (final EmbedderMonitor monitor : this.monitors) {
        try {
            monitor.usingControls(embedderControls);
        } catch (final Exception suppressed) {
            logger.error("exception during calling " + monitor.getClass() + "#usingControls", suppressed);
            exceptions.add(suppressed);
        }
    }
    processSuppressed(exceptions);
}
Also used : EmbedderMonitor(org.jbehave.core.embedder.EmbedderMonitor)

Example 33 with EmbedderMonitor

use of org.jbehave.core.embedder.EmbedderMonitor in project serenity-jbehave by serenity-bdd.

the class CompositeEmbedderMonitor method invalidTimeoutFormat.

@Override
public void invalidTimeoutFormat(final String path) {
    logger.debug("invalidTimeoutFormat" + path);
    final LinkedList<Exception> exceptions = new LinkedList<>();
    for (final EmbedderMonitor monitor : this.monitors) {
        try {
            monitor.invalidTimeoutFormat(path);
        } catch (final Exception suppressed) {
            logger.error("exception during calling " + monitor.getClass() + "#invalidTimeoutFormat", suppressed);
            exceptions.add(suppressed);
        }
    }
    processSuppressed(exceptions);
}
Also used : EmbedderMonitor(org.jbehave.core.embedder.EmbedderMonitor)

Example 34 with EmbedderMonitor

use of org.jbehave.core.embedder.EmbedderMonitor in project serenity-jbehave by serenity-bdd.

the class CompositeEmbedderMonitor method reportsViewGenerated.

@Override
public void reportsViewGenerated(final ReportsCount count) {
    logger.debug("reportsViewGenerated" + count);
    final LinkedList<Exception> exceptions = new LinkedList<>();
    for (final EmbedderMonitor monitor : this.monitors) {
        try {
            monitor.reportsViewGenerated(count);
        } catch (final Exception suppressed) {
            logger.error("exception during calling " + monitor.getClass() + "#reportsViewGenerated", suppressed);
            exceptions.add(suppressed);
        }
    }
    processSuppressed(exceptions);
}
Also used : EmbedderMonitor(org.jbehave.core.embedder.EmbedderMonitor)

Example 35 with EmbedderMonitor

use of org.jbehave.core.embedder.EmbedderMonitor in project serenity-jbehave by serenity-bdd.

the class CompositeEmbedderMonitor method annotatedInstanceNotOfType.

@Override
public void annotatedInstanceNotOfType(final Object annotatedInstance, final Class<?> type) {
    logger.debug("annotatedInstanceNotOfType" + annotatedInstance + type);
    final LinkedList<Exception> exceptions = new LinkedList<>();
    for (final EmbedderMonitor monitor : this.monitors) {
        try {
            monitor.annotatedInstanceNotOfType(annotatedInstance, type);
        } catch (final Exception suppressed) {
            logger.error("exception during calling " + monitor.getClass() + "#annotatedInstanceNotOfType", suppressed);
            exceptions.add(suppressed);
        }
    }
    processSuppressed(exceptions);
}
Also used : EmbedderMonitor(org.jbehave.core.embedder.EmbedderMonitor)

Aggregations

EmbedderMonitor (org.jbehave.core.embedder.EmbedderMonitor)36 File (java.io.File)2 Properties (java.util.Properties)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 InjectableEmbedder (org.jbehave.core.InjectableEmbedder)2 Embedder (org.jbehave.core.embedder.Embedder)2 BatchFailures (org.jbehave.core.failures.BatchFailures)2 ReportsCount (org.jbehave.core.reporters.ReportsCount)2 Test (org.junit.Test)2 Log (org.apache.maven.plugin.logging.Log)1 Project (org.apache.tools.ant.Project)1