Package fitnesse.junit

Source Code of fitnesse.junit.FitNesseSuite

package fitnesse.junit;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.runners.model.InitializationError;

/**
* Use fitnesse.junit.FitNesseRunner.
* @deprecated Use fitnesse.junit.FitNesseRunner.
*/
@Deprecated
public class FitNesseSuite extends FitNesseRunner {
  /**
   * The <code>Name</code> annotation specifies the name of the Fitnesse suite
   * to be run, e.g.: MySuite.MySubSuite
   * @deprecated Use FitNesseRunner.Suite
   */
  @Deprecated
  @Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.TYPE)
  public @interface Name {

    public String value();
  }

  public FitNesseSuite(Class<?> suiteClass) throws InitializationError {
    super(suiteClass);
  }

  @Override
  protected String getSuiteName(Class<?> klass) throws InitializationError {
    Name nameAnnotation = klass.getAnnotation(Name.class);
    if (nameAnnotation == null) {
      throw new InitializationError("There must be a @Name annotation");
    }
    return nameAnnotation.value();
  }
}
TOP

Related Classes of fitnesse.junit.FitNesseSuite

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.