Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Created April 20, 2014 07:06
Show Gist options
  • Save samueltcsantos/11107276 to your computer and use it in GitHub Desktop.
Save samueltcsantos/11107276 to your computer and use it in GitHub Desktop.
Before e After
package com.java.junit3x;
import com.java.junit.Produto;
import junit.framework.TestCase;
/**
* Tests JUnit3.x para a classe Produto.
*
* @author Samuel T. C. Santos
*
*/
public class ProdutoTest extends TestCase {
Produto produto;
//inicializa o objeto antes de executar cada teste
public void setUp(){
produto = new Produto();
}
//apos executar cada teste torna o objeto null novamente.
public void tearDown(){
produto = null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment