001 /*
002 * $Id: DelegateTo.java,v 1.2 2014/01/04 17:10:22 oboehm Exp $
003 *
004 * Copyright (c) 2011 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 13.12.2011 by oliver (ob@oasd.de)
019 */
020
021 package patterntesting.runtime.annotation;
022
023 import java.lang.annotation.*;
024
025 import org.junit.runners.ParentRunner;
026 import org.junit.runners.model.FrameworkMethod;
027
028 /**
029 * If you use <code>@RunWith(ProxyRunner.class)</code> use must tell the
030 * {@link patterntesting.runtime.junit.ProxyRunner} class which class it
031 * should use for delegation. ProxyRunner will use this class (which must be
032 * derived from {@link ParentRunner}) to start the tests but will handle the
033 * same additional annotations like the
034 * {@link patterntesting.runtime.junit.SmokeRunner}.
035 *
036 * @author oboehm
037 * @since 1.2 (13.12.2011)
038 */
039 @Documented
040 @Target(ElementType.TYPE)
041 @Retention(RetentionPolicy.RUNTIME)
042 public @interface DelegateTo {
043
044 /**
045 * @return a Runner class (must have a constructor that takes a single Class to run).
046 */
047 Class<? extends ParentRunner<FrameworkMethod>> value();
048
049 }
050