TWiki home XP > XP > TestaJogadorIteracaoFinal ( vs. r1.1) XP webs:
Main | TWiki | Sandbox | Portugues
XP . { Bugzilla Últimas atualizações Busca Registro Sobre o TWiki }
 <<O>>  Difference Topic TestaJogadorIteracaoFinal (r1.1 - 07 Jul 2005 - AndreGermanoRegert)
Line: 1 to 1
Added:
>
>
META TOPICPARENT TestesParaOJogoDoMeio
-- AndreGermanoRegert - 07 Jul 2005


/*
 * Criado em 30/07/2005
 */
package testesDoJogoDoMeio;

import jogoDoMeio.*;
import junit.framework.Assert;

/**
 * @author André Germano Regert
 *          Jader Wallauer
 */
public class testaJogador {

   public static void main(String[] args) {
      
      TestaNomeJogador();
      TestaAdicionaPontos();
      
      System.out.println("Jogadores OK");
   }
   
   private static void TestaAdicionaPontos() {
      try {
         String nome = "Pedro";
         Jogador j = new Jogador(nome);
         j.adicionaPontos(0);
      } catch (AssertionError ae) {
         assert ae.getMessage().equals("Os pontos a adicionar devem ser maiores que zero");
         //if (ae.getMessage().equals("Os pontos a adicionar devem ser maiores que zero")) {
            //throw ae;
         //}
      }
   }

   public static void TestaNomeJogador(){
      String nome = "Pedro";
      Jogador j = new Jogador(nome);
      Assert.assertFalse("O jogador não possui nome",j.Nome().equals("")); 
   }
}


Topic TestaJogadorIteracaoFinal . { View | Diffs | r1.1 | More }
Revision -
Revision r1.1 - 07 Jul 2005 - 22:50 - AndreGermanoRegert
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding XP? Send feedback.