Package org.andromda.cartridges.testsuite

Examples of org.andromda.cartridges.testsuite.CartridgeTest


                // - unpack the expected output archive
                this.unpack(
                    expectedOutputArchive,
                    new File(this.expectedDirectory));

                final CartridgeTest cartridgeTest = CartridgeTest.instance();
                cartridgeTest.setActualOutputPath(this.actualDirectory);
                cartridgeTest.setExpectedOutputPath(this.expectedDirectory);
                cartridgeTest.setBinarySuffixes(this.binaryOutputSuffixes);

                final CartridgeTestFormatter formatter = new CartridgeTestFormatter();

                // - set the report location
                final File report = new File(this.reportDirectory, this.project.getArtifactId() + ".txt");
                formatter.setReportFile(report);
                final TestResult result = new TestResult();
                result.addListener(formatter);
                final Test suite = CartridgeTest.suite();
                formatter.startTestSuite(this.project.getName());
                suite.run(result);
                this.getLog().info("");
                this.getLog().info("Results:");
                this.getLog().info(formatter.endTestSuite(suite));
                cartridgeTest.shutdown();
                if (result.failureCount() > 0 || result.errorCount() > 0)
                {
                    throw new MojoExecutionException("Test are some test failures");
                }
            }
View Full Code Here

TOP

Related Classes of org.andromda.cartridges.testsuite.CartridgeTest

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.