Package com.mycila.testing.core.api

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


        super(name);
    }

    @Override
    public final void runBare() throws Throwable {
        final TestNotifier testNotifier = MycilaTesting.from(getClass()).configure(this).createNotifier(this);
        ShutdownHook.get().add(new Closeable() {
            public void close() throws Exception {
                testNotifier.shutdown();
            }
        });
        testNotifier.prepare();
        try {
            setUp();
            testNotifier.fireBeforeTest(getTestMethod());
            TestExecution testExecution = (TestExecution) Mycila.currentExecution();
            if (!testExecution.mustSkip()) {
                try {
                    LOGGER.debug("Calling test method %s.%s", testExecution.method().getDeclaringClass().getName(), testExecution.method().getName());
                    super.runTest();
                } catch (Throwable t) {
                    testExecution.setThrowable(t);
                }
            }
            testNotifier.fireAfterTest();
            tearDown();
            if (testExecution.hasFailed()) {
                throw testExecution.throwable().fillInStackTrace();
            }
        } finally {
            testNotifier.fireAfterClass();
        }
    }
View Full Code Here


        super(name);
    }

    @Override
    public final void runBare() throws Throwable {
        final TestNotifier testNotifier = MycilaTesting.from(getClass()).configure(this).createNotifier(this);
        ShutdownHook.get().add(new Closeable() {
            public void close() throws Exception {
                testNotifier.shutdown();
            }
        });
        testNotifier.prepare();
        try {
            setUp();
            testNotifier.fireBeforeTest(getTestMethod());
            TestExecution testExecution = (TestExecution) Mycila.currentExecution();
            if (!testExecution.mustSkip()) {
                try {
                    LOGGER.debug("Calling test method {0}.{1}", testExecution.method().getDeclaringClass().getName(), testExecution.method().getName());
                    super.runTest();
                } catch (Throwable t) {
                    testExecution.setThrowable(t);
                }
            }
            testNotifier.fireAfterTest();
            tearDown();
            if (testExecution.hasFailed()) {
                throw testExecution.throwable().fillInStackTrace();
            }
        } finally {
            testNotifier.fireAfterClass();
        }
    }
View Full Code Here

TOP

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

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.