<commit_before>import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class ElfoTest
{
    @Test
    public void criaElfoTesteNome(){
        Elfo elfo = new Elfo("nome");
        assertEquals("nome", elfo.getNome());
    }
    
    @Test
    public void criaElfoTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        assertEquals(42, elfo.getFlechas());
    }
    
    @Test
    public void criaElfoTesteExp(){
        Elfo elfo = new Elfo("nome");
        assertEquals(0, elfo.getExperiencia());
    }
    
    @Test
    public void atiraFlechaTesteXp(){
        Elfo elfo = new Elfo("nome");
        elfo.atirarFlecha();
        assertEquals(1, elfo.getExperiencia());
    }
        
    @Test
    public void atiraFlechaTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        elfo.atirarFlecha();
        assertEquals(41, elfo.getFlechas());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteXp(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(1, elfo.getExperiencia());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(41, elfo.getFlechas());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteVidaAnao(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(100, dwarf.getVida());
    }
}<commit_msg>feat(ClasseElfoTest): adicionar teste de toString().<commit_after>import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class ElfoTest
{
    @Test
    public void criaElfoTesteNome(){
        Elfo elfo = new Elfo("nome");
        assertEquals("nome", elfo.getNome());
    }
    
    @Test
    public void criaElfoTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        assertEquals(42, elfo.getFlechas());
    }
    
    @Test
    public void criaElfoTesteExp(){
        Elfo elfo = new Elfo("nome");
        assertEquals(0, elfo.getExperiencia());
    }
    
    @Test
    public void atiraFlechaTesteXp(){
        Elfo elfo = new Elfo("nome");
        elfo.atirarFlecha();
        assertEquals(1, elfo.getExperiencia());
    }
        
    @Test
    public void atiraFlechaTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        elfo.atirarFlecha();
        assertEquals(41, elfo.getFlechas());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteXp(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(1, elfo.getExperiencia());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteFlecha(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(41, elfo.getFlechas());
    }
    
        
    @Test
    public void atiraFlechaAnaoTesteVidaAnao(){
        Elfo elfo = new Elfo("nome");
        Dwarf dwarf = new Dwarf("nome");
        elfo.atirarFlecha(dwarf);
        assertEquals(100, dwarf.getVida());
    }
    
    @Test
    public void elfoTesteToString(){
        Elfo elfo = new Elfo("nome");
        assertEquals(elfo.getNome() + " possui " + elfo.getFlechas()
                + " flechas e " + elfo.getExperiencia()
                + " niveis de experiência", elfo.toString());
    }
}


{'fraction_non_alphanumeric': 0.12506948304613674, 'fraction_numerical': 0.006670372429127293, 'mean_word_length': 2.2162645218945487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3951497', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1259, 'n_words': 240}