Package org.mule.munit.runner.mule.result.notification

Examples of org.mule.munit.runner.mule.result.notification.Notification


        out.flush();
    }

    public void notify(TestResult testResult)
    {
        Notification notification = null;
        if (testResult.getNumberOfErrors() > 0)
        {
            out.println("ERROR - The test " + testResult.getTestName() + " finished with an Error.");
            out.flush();
            notification = testResult.getError();
        }
        else if (testResult.getFailure() != null)
        {
            out.println("FAILURE - The test " + testResult.getTestName() + " finished with a Failure.");
            out.flush();
            notification = testResult.getFailure();
        }

        if (notification != null)
        {
            out.println(notification.getShortMessage());

            if (debugMode)
            {
                out.println(notification.getFullMessage());
            }
            out.flush();
        }
        else if (testResult.isSkipped())
        {
View Full Code Here


{

    public static TestResult failingTest(String name)
    {
        TestResult testResult = new TestResult(name);
        testResult.setFailure(new Notification("fail", "Test fail"));
        return testResult;
    }
View Full Code Here

    }

    public static TestResult errorTest(String name)
    {
        TestResult testResult = new TestResult(name);
        testResult.setError(new Notification("error", "Test error"));
        return testResult;
    }
View Full Code Here

    }


    private Notification buildNotifcationFrom(Throwable t)
    {
        return new Notification(t.getMessage(), stack2string(t));
    }
View Full Code Here

TOP

Related Classes of org.mule.munit.runner.mule.result.notification.Notification

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.