Package org.junit.runner

Examples of org.junit.runner.Description


        if (!ArrayUtils.isEmpty(this.getQunitTests())) {
            for (QUnitTest qunitTest : this.getQunitTests()) {
                // qunit test description name
                final String qunitTestDescriptionName = qunitTest.getDescriptionName();
                // unique test description for notifier
                final Description testDescription = this.getTestSuite().getTestDescriptions()
                        .get(NamingUtils.createUniqueTestName(qunitTestDescriptionName));
                // notify that test started
                this.getNotifier().fireTestStarted(testDescription);
                if (qunitTest.isFailed()) {
                    // notify test failure
View Full Code Here


    private void reportRemainingTests() {
        final Map<String, List<String>> expectedTestsMap = this.getExpectedTestsBySuiteName();
        if (expectedTestsMap != null && expectedTestsMap.containsKey(this.getTestMethod().getQUnitTestSuiteFilePath())) {
            final List<String> expectedTests = expectedTestsMap.get(this.getTestMethod().getQUnitTestSuiteFilePath());
            for (String test : expectedTests) {
                final Description testDescription = this.getTestSuite().getTestDescriptions()
                        .get(NamingUtils.createUniqueTestName(test));
                notifier.fireTestStarted(testDescription);
                notifier.fireTestFailure(new Failure(testDescription, new Exception(
                        "QUnit test was not executed or stuck and did not finish within time")));
            }
View Full Code Here

          @Override
          public void run(final RunNotifier notifier) {
            final IOCClientTestCase iocClientTestCase = (IOCClientTestCase) getInstance();

            final Description description = getDescription();

            notifier.fireTestStarted(description);

            final TestResult result = new TestResult();
View Full Code Here

          @Override
          public void run(RunNotifier notifier) {
            final IOCClientTestCase iocClientTestCase = (IOCClientTestCase) getInstance();

            Description description = getDescription();

            notifier.fireTestStarted(description);

            TestResult result = new TestResult();
View Full Code Here

        if (classSingleScriptAnnotation == null) {
            return statement;
        } else {
            final String name = computeBMRulesName(classSingleScriptAnnotation.value(), testKlazz);
            final RunNotifier fnotifier = notifier;
            final Description description = Description.createTestDescription(testKlazz, getName(), classSingleScriptAnnotation);
            final String loadDirectory = normaliseLoadDirectory(classSingleScriptAnnotation);
            return new Statement() {
                public void evaluate() throws Throwable {
                    try {
                        BMUnit.loadScriptFile(testKlazz, name, loadDirectory);
View Full Code Here

            // which means the the outer statement gets executed first
            for (int i = scriptAnnotations.length; i> 0; i--) {
                BMScript scriptAnnotation= scriptAnnotations[i - 1];
                final String name = computeBMRulesName(scriptAnnotation.value(), testKlazz);
                final RunNotifier fnotifier = notifier;
                final Description description = Description.createTestDescription(testKlazz, getName(), scriptAnnotation);
                final String loadDirectory = normaliseLoadDirectory(scriptAnnotation);
                final Statement nextStatement = result;
                result = new Statement() {
                    public void evaluate() throws Throwable {
                        try {
View Full Code Here

        if (classMultiRuleAnnotation == null) {
            return statement;
        } else {
            final String scriptText = constructScriptText(classMultiRuleAnnotation.rules());
            final RunNotifier fnotifier = notifier;
            final Description description = Description.createTestDescription(testKlazz, getName(), classMultiRuleAnnotation);
            return new Statement() {
                public void evaluate() throws Throwable {
                    try {
                        BMUnit.loadScriptText(testKlazz, null, scriptText);
                        try {
View Full Code Here

        if (classSingleRuleAnnotation == null) {
            return statement;
        } else {
            final String scriptText = constructScriptText(new BMRule[] {classSingleRuleAnnotation});
            final RunNotifier fnotifier = notifier;
            final Description description = Description.createTestDescription(testKlazz, getName(), classSingleRuleAnnotation);
            return new Statement() {
                public void evaluate() throws Throwable {
                    try {
                        BMUnit.loadScriptText(testKlazz, null, scriptText);
                        try {
View Full Code Here

                for ( Path path : simulation.getPaths().values() ) {
                    for ( Step step : path.getSteps() ) {
                        for ( Command command : step.getCommands() ) {
                            if ( command instanceof TestGroupCommand ) {
                                String testName = ((TestGroupCommand) command).getName();
                                Description testGroupDescr = Description.createTestDescription( cls,
                                                                                                testName );
                                this.descr.addChild( testGroupDescr );
                                this.testGroups.put( testName,
                                                     testGroupDescr );
                            }
View Full Code Here

        public Object execute(GenericCommand command,
                              Context context) {
            if ( command instanceof TestGroupCommand ) {
                TestGroupCommand testGroupCmd = (TestGroupCommand) command;
                Description descr = this.testGroups.get( testGroupCmd.getName() );
                this.notifier.fireTestStarted( descr );
                try {
                    command.execute( context );
                    this.notifier.fireTestFinished( descr );
                    return null;
View Full Code Here

TOP

Related Classes of org.junit.runner.Description

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.