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

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

      
    
Rootfs path

      
    
Size
1118 (1.1 KB)
MD5
359ac531d779f4e10f0bd00d5d7c8794
SHA1
82a9cbbcca0bbd7adcfe2a6a785d3cf077c10149
SHA256
7774f28cf0c170b5abe99cc2250193e586ce166ec7b30c30e4909dd0db1da9de
SHA512

      
    
SHA1_git
def8adb47ad64964abd0aa9190809de76dcac544
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Before.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; /** * When writing tests, it is common to find that several tests need similar * objects created before they can run. Annotating a <code>public void</code> method * with <code>&#064;Before</code> causes that method to be run before the {@link org.junit.Test} method. * The <code>&#064;Before</code> methods of superclasses will be run before those of the current class, * unless they are overridden in the current class. No other ordering is defined. * <p> * Here is a simple example: * <pre> * public class Example { * List empty; * &#064;Before public void initialize() { * empty= new ArrayList(); * } * &#064;Test public void size() { * ... * } * &#064;Test public void remove() { * ... * } * } * </pre> * * @see org.junit.BeforeClass * @see org.junit.After * @since 4.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Before { }