ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/junit/extensions/TestSetup.java

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

      
    
Rootfs path

      
    
Size
1057 (1.0 KB)
MD5
93c47b83dfc0d632231cbaff26ef1d75
SHA1
78a0c5aa4889386cd11f5283f420f0c8ab97bcb6
SHA256
32822c91ff650ac60d8b3240abfd0042e1793684cfa605a81ef05af9ef530fbf
SHA512

      
    
SHA1_git
fcdca8cc51bd85cd0ee5bddd9a1a117f4df7f5e6
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestSetup.java | 1.0 KB |

package junit.extensions; import junit.framework.Protectable; import junit.framework.Test; import junit.framework.TestResult; /** * A Decorator to set up and tear down additional fixture state. Subclass * TestSetup and insert it into your tests when you want to set up additional * state once before the tests are run. */ public class TestSetup extends TestDecorator { public TestSetup(Test test) { super(test); } @Override public void run(final TestResult result) { Protectable p = new Protectable() { public void protect() throws Exception { setUp(); basicRun(result); tearDown(); } }; result.runProtected(this, p); } /** * Sets up the fixture. Override to set up additional fixture state. */ protected void setUp() throws Exception { } /** * Tears down the fixture. Override to tear down the additional fixture * state. */ protected void tearDown() throws Exception { } }