Package org.junit.runner

Examples of org.junit.runner.Description


    protected void invokeTestMethod(final Method method, final RunNotifier notifier) {

        final TestClass testClass = getTestClass();
        final String configDirIfAny = getConfigDir(testClass.getJavaClass());

        final Description description = methodDescription(method);

        final IsisConfigurationBuilder isisConfigurationBuilder = new IsisConfigurationBuilderDefault(configDirIfAny);
        isisConfigurationBuilder.add(SystemConstants.NOSPLASH_KEY, "" + true); // switch
                                                                               // off
                                                                               // splash
View Full Code Here


    protected void runChild( FrameworkMethod method, RunNotifier notifier )
    {
        // Don't run the test if the @Ignored annotation is used
        if ( method.getAnnotation( Ignore.class ) != null )
        {
            Description description = describeChild( method );
            notifier.fireTestIgnored( description );
            return;
        }

        // Get the applyLdifs for each level
        Description suiteDescription = null;

        if ( suite != null )
        {
            suiteDescription = suite.getDescription();
        }

        Description classDescription = getDescription();
        Description methodDescription = describeChild( method );

        // Ok, ready to run the test
        try
        {
            DirectoryService directoryService = null;
View Full Code Here

        if (test instanceof TestSuite)
        {
            TestSuite ts = (TestSuite) test;
            String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName();
            Description description = Description.createSuiteDescription(name);
            int n = ts.testCount();
            for (int i = 0; i < n; i++)
            {
                Description made = makeDescription(ts.testAt(i));
                description.addChild(made);
            }
            return description;
        }
View Full Code Here

                for ( SimulationPath path : simulation.getPaths().values() ) {
                    for ( SimulationStep 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

    protected void invokeTestMethod(final Method method, final RunNotifier notifier) {

        final TestClass testClass = getTestClass();
        final String configDirIfAny = getConfigDir(testClass.getJavaClass());

        final Description description = methodDescription(method);

        final IsisConfigurationBuilder isisConfigurationBuilder = new IsisConfigurationBuilderDefault(configDirIfAny);
        isisConfigurationBuilder.add(SystemConstants.NOSPLASH_KEY, "" + true); // switch
                                                                               // off
                                                                               // splash
View Full Code Here

    public Collection<MethodReference> collectTestMethods() {
        return MethodReference.all(jclass, Test.class);
    }

    public Description getDescription() {
        Description description = Description.createSuiteDescription(jclass);
        for (Example tm: graph.getExamples())
            if (this.contains(tm)) description.addChild(tm.description);
        return description;
    }
View Full Code Here

            throw new RuntimeDroolsException( "Error instantiating node test runner: "+e, e );
        }
        this.descr = Description.createSuiteDescription( "Node test case suite" );

        for ( NodeTestCase tcase : testCases ) {
            Description tcaseDescr = Description.createSuiteDescription( tcase.getFileName() != null ?
                                                                         tcase.getFileName() : tcase.getName() );
            tcase.setDescription( tcaseDescr );
            this.descr.addChild( tcaseDescr );
            for ( NodeTestDef ntest : tcase.getTests() ) {
                Description ntestDescr = Description.createTestDescription( clazz,
                                                                            ntest.getName() );
                tcaseDescr.addChild( ntestDescr );
                ntest.setDescription( ntestDescr );
            }
        }
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.