Package org.jbehave.core.junit.weld

Source Code of org.jbehave.core.junit.weld.WeldAnnotatedPathRunner

package org.jbehave.core.junit.weld;

import org.jbehave.core.configuration.AnnotationBuilder;
import org.jbehave.core.configuration.weld.WeldAnnotationBuilder;
import org.jbehave.core.configuration.weld.WeldBootstrap;
import org.jbehave.core.junit.AnnotatedPathRunner;
import org.junit.runners.model.InitializationError;

/**
* AnnotatedPathRunner that uses {@link WeldAnnotationBuilder}.
*
* @author Aaron Walker
*/
public class WeldAnnotatedPathRunner extends AnnotatedPathRunner {

    private WeldBootstrap container;

    public WeldAnnotatedPathRunner(Class<?> testClass) throws InitializationError {
        super(testClass);

    }

    public AnnotationBuilder annotationBuilder() {
        if (container == null) {
            container = new WeldBootstrap();
            container.initialize();
        }
        return container.findAnnotationBuilder(testClass());
    }
}
TOP

Related Classes of org.jbehave.core.junit.weld.WeldAnnotatedPathRunner

TOP
Copyright © 2018 www.massapi.com. 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.