ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/BeforeClass.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/BeforeClass.java
Status
scanned
Type
file
Name
BeforeClass.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
1123 (1.1 KB)
MD5
c2333adfd3f5de65153ceab8d4314e5b
SHA1
5f874bcc240c4cdcc3c964a70830f9a28baf4f7d
SHA256
7973dd11e5537d33412c2309ef20254396f378a4a66506411b6ae16cd3667b53
SHA512

      
    
SHA1_git
8183fa0f0a140e4838a07459d688e3c5ca1edc25
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
BeforeClass.java | 1.1 KB |

package org.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Sometimes several tests need to share computationally expensive setup * (like logging into a database). While this can compromise the independence of * tests, sometimes it is a necessary optimization. Annotating a <code>public static void</code> no-arg method * with <code>@BeforeClass</code> causes it to be run once before any of * the test methods in the class. The <code>@BeforeClass</code> methods of superclasses * will be run before those of the current class, unless they are shadowed in the current class. * <p> * For example: * <pre> * public class Example { * &#064;BeforeClass public static void onlyOnce() { * ... * } * &#064;Test public void one() { * ... * } * &#064;Test public void two() { * ... * } * } * </pre> * * @see org.junit.AfterClass * @since 4.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface BeforeClass { }