Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Last active August 29, 2015 14:00
Show Gist options
  • Save samueltcsantos/11107709 to your computer and use it in GitHub Desktop.
Save samueltcsantos/11107709 to your computer and use it in GitHub Desktop.
Suite de Teste
package com.java.junit3x;
import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
public static void main(String args[]){
junit.textui.TestRunner.run(suite());;
}
public static Test suite(){
TestSuite suite = new TestSuite("Testes Catalogo e Produto");
suite.addTest(TestSuite.createTest(ProdutoTest.class, "testNaoDeveSerNull"));
suite.addTest(TestSuite.createTest(ProdutoTest.class, "testDeveSerDiferenteDeOutroProdutoInicializado"));
suite.addTest(TestSuite.createTest(ProdutoTest.class, "testDeveSerIgualQuandoFizerReferenciaParaOMesmoObjeto"));
suite.addTest(TestSuite.createTest(ProdutoTest.class, "testMostreQueMesmosValoresNaoSignificaMesmoObjeto"));
suite.addTest(TestSuite.createTest(CatalogoDeProdutosTest.class, "testDeveAdicionarProdutoNoCatalogo"));
suite.addTest(TestSuite.createTest(CatalogoDeProdutosTest.class, "testDeveSaberRemoverProdutosDoCatalogo"));
suite.addTest(TestSuite.createTest(CatalogoDeProdutosTest.class, "junit4TestComAnnotationsDeveTestarOTotalDeProdutos"));
return suite;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment