Package com.mycila.testing.core.api

Examples of com.mycila.testing.core.api.TestPluginException


    @SuppressWarnings({"unchecked"})
    public <T> T get(String name) {
        notNull("Attribute name", name);
        T att = (T) attributes.get(name);
        if (att == null) {
            throw new TestPluginException("Inexisting attribute: '%s'", name);
        }
        return att;
    }
View Full Code Here


            LOGGER.debug("Calling 'prepareTestInstance' on plugins for test %s#%s...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().prepareTestInstance(this);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'prepareTestInstance' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

            LOGGER.debug("Calling 'beforeTest' on plugins for test %s#%s...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().beforeTest(testExecution);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'beforeTest' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
            Mycila.registerCurrentExecution(testExecution.changeStep(Step.TEST));
View Full Code Here

            LOGGER.debug("Calling 'afterTest' on plugins for test %s#%s...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().afterTest(testExecution);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'afterTest' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

            LOGGER.debug("Calling 'afterClass' on plugins for test %s#%s...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().afterClass(this);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'afterClass' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

            LOGGER.debug("Calling 'prepareTestInstance' on plugins for test {0}#{1,number,#}...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().prepareTestInstance(this);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'prepareTestInstance' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

            LOGGER.debug("Calling 'beforeTest' on plugins for test {0}#{1,number,#}...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().beforeTest(testExecution);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'beforeTest' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
            Mycila.registerCurrentExecution(testExecution.changeStep(Step.TEST));
View Full Code Here

            LOGGER.debug("Calling 'afterTest' on plugins for test {0}#{1,number,#}...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().afterTest(testExecution);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'afterTest' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

            LOGGER.debug("Calling 'afterClass' on plugins for test {0}#{1,number,#}...", introspector.testClass().getName(), introspector.instance().hashCode());
            for (PluginBinding<TestPlugin> binding : pluginManager.getResolver().getResolvedPlugins()) {
                try {
                    binding.getPlugin().afterClass(this);
                } catch (Exception e) {
                    throw new TestPluginException(e, "An error occured while executing 'afterClass' on plugin '%s': %s: %s", binding.getName(), e.getClass().getSimpleName(), e.getMessage());
                }
            }
        } finally {
            Mycila.unsetCurrentExecution();
        }
View Full Code Here

TOP

Related Classes of com.mycila.testing.core.api.TestPluginException

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.