forked from junit-team/junit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisabled.java
More file actions
72 lines (65 loc) · 2.79 KB
/
Disabled.java
File metadata and controls
72 lines (65 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Copyright 2015-2025 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
*
* https://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 <em>disabled</em> and should not be executed.
*
* <p>{@code @Disabled} may optionally be declared with a {@linkplain #value
* reason} to document why the annotated test class or test method is disabled.
*
* <p>When applied at the class level, all test methods within that class
* are automatically disabled as well.
*
* <p>This annotation is not {@link java.lang.annotation.Inherited @Inherited}.
* Consequently, if you wish to apply the same semantics to a subclass, this
* annotation must be redeclared on the subclass.
*
* <p>If a test method is disabled via this annotation, that prevents execution
* of the test method and method-level lifecycle callbacks such as
* {@code @BeforeEach} methods, {@code @AfterEach} methods, and corresponding
* extension APIs. However, that does not prevent the test class from being
* instantiated, and it does not prevent the execution of class-level lifecycle
* callbacks such as {@code @BeforeAll} methods, {@code @AfterAll} methods, and
* corresponding extension APIs.
*
* @since 5.0
* @see #value
* @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.EnabledForJreRange
* @see org.junit.jupiter.api.condition.DisabledForJreRange
* @see org.junit.jupiter.api.condition.EnabledOnOs
* @see org.junit.jupiter.api.condition.DisabledOnOs
* @see org.junit.jupiter.api.condition.EnabledInNativeImage
* @see org.junit.jupiter.api.condition.DisabledInNativeImage
* @see org.junit.jupiter.api.extension.ExecutionCondition
*/
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface Disabled {
/**
* The reason this annotated test class or test method is disabled.
*/
String value() default "";
}