001/*
002 * Copyright 2002-2016 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.test.context.junit4;
018
019import org.junit.runners.model.InitializationError;
020
021/**
022 * {@code SpringRunner} is an <em>alias</em> for the {@link SpringJUnit4ClassRunner}.
023 *
024 * <p>To use this class, simply annotate a JUnit 4 based test class with
025 * {@code @RunWith(SpringRunner.class)}.
026 *
027 * <p>If you would like to use the Spring TestContext Framework with a runner other than
028 * this one, use {@link org.springframework.test.context.junit4.rules.SpringClassRule}
029 * and {@link org.springframework.test.context.junit4.rules.SpringMethodRule}.
030 *
031 * <p><strong>NOTE:</strong> This class requires JUnit 4.12 or higher.
032 *
033 * @author Sam Brannen
034 * @since 4.3
035 * @see SpringJUnit4ClassRunner
036 * @see org.springframework.test.context.junit4.rules.SpringClassRule
037 * @see org.springframework.test.context.junit4.rules.SpringMethodRule
038 */
039public final class SpringRunner extends SpringJUnit4ClassRunner {
040
041        /**
042         * Construct a new {@code SpringRunner} and initialize a
043         * {@link org.springframework.test.context.TestContextManager TestContextManager}
044         * to provide Spring testing functionality to standard JUnit 4 tests.
045         * @param clazz the test class to be run
046         * @see #createTestContextManager(Class)
047         */
048        public SpringRunner(Class<?> clazz) throws InitializationError {
049                super(clazz);
050        }
051
052}