org.junit.jupiter.api.condition.DisabledOnJre Maven / Gradle / Ivy
Show all versions of junit-jupiter-api Show documentation
/*
* Copyright 2015-2018 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
* accompanies this distribution and is available at
*
* http://www.eclipse.org/legal/epl-v20.html
*/
package org.junit.jupiter.api.condition;
import static org.apiguardian.api.API.Status.STABLE;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.apiguardian.api.API;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* {@code @DisabledOnJre} is used to signal that the annotated test class or
* test method is disabled on one or more specified Java
* Runtime Environment (JRE) {@linkplain #value versions}.
*
* When applied at the class level, all test methods within that class
* will be disabled on the same specified JRE versions.
*
* @since 5.1
* @see org.junit.jupiter.api.Disabled
* @see org.junit.jupiter.api.condition.EnabledIf
* @see org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable
* @see org.junit.jupiter.api.condition.EnabledIfSystemProperty
* @see org.junit.jupiter.api.condition.EnabledOnJre
* @see org.junit.jupiter.api.condition.EnabledOnOs
* @see org.junit.jupiter.api.condition.DisabledIf
* @see org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable
* @see org.junit.jupiter.api.condition.DisabledIfSystemProperty
* @see org.junit.jupiter.api.condition.DisabledOnOs
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ExtendWith(DisabledOnJreCondition.class)
@API(status = STABLE, since = "5.1")
public @interface DisabledOnJre {
/**
* Java Runtime Environment versions on which the annotated class or
* method should be disabled.
*
* @see JRE
*/
JRE[] value();
}