All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.junit.jupiter.api.Disabled Maven / Gradle / Ivy

There is a newer version: 5.11.0-M1
Show newest version
/*
 * Copyright 2015-2019 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;

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;

/**
 * {@code @Disabled} is used to signal that the annotated test class or
 * test method is currently disabled and should not be executed.
 *
 * 

{@code @Disabled} may optionally be declared with a {@linkplain #value * reason} to document why the annotated test class or test method is disabled. * *

When applied at the class level, all test methods within that class * are automatically disabled as well. * *

When applied at the method level, the presence of this annotation does not * prevent the test class from being instantiated. Rather, it prevents the * execution of the test method and method-level lifecycle callbacks such as * {@code @BeforeEach} methods, {@code @AfterEach} methods, and corresponding * extension APIs. * * @since 5.0 * @see #value * @see org.junit.jupiter.api.condition.EnabledIf * @see org.junit.jupiter.api.condition.DisabledIf * @see org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable * @see org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable * @see org.junit.jupiter.api.condition.EnabledIfSystemProperty * @see org.junit.jupiter.api.condition.DisabledIfSystemProperty * @see org.junit.jupiter.api.condition.EnabledOnJre * @see org.junit.jupiter.api.condition.DisabledOnJre * @see org.junit.jupiter.api.condition.EnabledOnOs * @see org.junit.jupiter.api.condition.DisabledOnOs * @see org.junit.jupiter.api.extension.ExecutionCondition */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Documented @API(status = STABLE, since = "5.0") public @interface Disabled { /** * The reason this annotated test class or test method is disabled. */ String value() default ""; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy