/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package testes.unidade;
import controllerTeste.AlunoController;
import junit.framework.TestCase;
import model.Aluno;
/**
*
* @author Sheila
*/
public class AlunoControllerTest extends TestCase {
public AlunoControllerTest(String testName) {
super(testName);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
/**
* Test of getNovoCodigo method, of class AlunoController.
*/
public void testGetNovoCodigo() {
System.out.println("AlunoControllerTest - getNovoCodigo");
AlunoController instance = new AlunoController();
String expResult = "1";
String result = instance.getNovoCodigo();
assertEquals(expResult, result);
}
/**
* Test of getAluno method, of class AlunoController.
*/
public void testGetAluno() {
System.out.println("AlunoControllerTest - getAluno");
String codigo = "1";
AlunoController instance = new AlunoController();
int expResult = 1;
int result = instance.getAluno(codigo).getCodigoAluno();
assertEquals(expResult, result);
}
/**
* Test of atualizar method, of class AlunoController.
*/
public void testAtualizar() {
System.out.println("AlunoControllerTest - atualizar");
String codigo = "1";
Aluno pAluno = new Aluno();
pAluno.setCodigoAluno(Integer.parseInt(codigo));
AlunoController instance = new AlunoController();
boolean expResult = true;
boolean result = instance.atualizar(pAluno);
assertEquals(expResult, result);
}
/**
* Test of salvar method, of class AlunoController.
*/
public void testSalvar() {
System.out.println("AlunoControllerTest - salvar");
String codigo = "1";
Aluno pAluno = new Aluno();
pAluno.setCodigoAluno(Integer.parseInt(codigo));
AlunoController instance = new AlunoController();
boolean expResult = true;
boolean result = instance.salvar(pAluno);
assertEquals(expResult, result);
}
/**
* Test of excluir method, of class AlunoController.
*/
public void testExcluir() {
System.out.println("AlunoControllerTest - excluir");
String codigo = "1";
AlunoController instance = new AlunoController();
boolean expResult = true;
boolean result = instance.excluir(codigo);
assertEquals(expResult, result);
}
/**
* Test of relacionarEstagio method, of class AlunoController.
*/
public void testRelacionarEstagio() {
System.out.println("AlunoControllerTest - relacionarEstagio");
String codigo = "1";
AlunoController instance = new AlunoController();
boolean expResult = true;
boolean result = instance.relacionarEstagio(codigo);
assertEquals(expResult, result);
}
}