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

/**
 * Testes integrados entre objetos Elfo e Orc.
 *
 * @author  CWI Software
 */
public class TestesIntegrados
{
    @Test
    public void umElfoAtiraEmDoisOrcs() {
        // Arrange
        Elfo elfo = new Elfo("O Elfo");
        Orc orc1 = new Orc();
        Orc orc2 = new Orc();
        // Act
        elfo.atirarFlecha(orc1);
        elfo.atirarFlecha(orc2);
        // Assert
        int experienciaEsperada = 2;
        int flechasEsperadas = 40;
        int vidaEsperadaOrc1 = 100;
        int vidaEsperadaOrc2 = 100;
        String toStringEsperadoOrc = "Vida atual: 100";
        
        assertEquals(experienciaEsperada, elfo.getExperiencia());
        assertEquals(flechasEsperadas, elfo.getFlechas());
        assertEquals(vidaEsperadaOrc1, orc1.getVida());
        assertEquals(vidaEsperadaOrc2, orc2.getVida());
        assertEquals(toStringEsperadoOrc, orc1.toString());
        assertEquals(toStringEsperadoOrc, orc2.toString());
    }
    
    
    
    
    
    
    
    
    
    
    
    
}<commit_msg>style(TestesIntegrados): unificar variáveis duplicadas.<commit_after>import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * Testes integrados entre objetos Elfo e Orc.
 *
 * @author  CWI Software
 */
public class TestesIntegrados
{
    @Test
    public void umElfoAtiraEmDoisOrcs() {
        // Arrange
        Elfo elfo = new Elfo("O Elfo");
        Orc orc1 = new Orc();
        Orc orc2 = new Orc();
        // Act
        elfo.atirarFlecha(orc1);
        elfo.atirarFlecha(orc2);
        // Assert
        int experienciaEsperada = 2;
        int flechasEsperadas = 40;
        int vidaEsperadaOrc = 100;
        String toStringEsperadoOrc = "Vida atual: 100";
        
        assertEquals(experienciaEsperada, elfo.getExperiencia());
        assertEquals(flechasEsperadas, elfo.getFlechas());
        assertEquals(vidaEsperadaOrc, orc1.getVida());
        assertEquals(vidaEsperadaOrc, orc2.getVida());
        assertEquals(toStringEsperadoOrc, orc1.toString());
        assertEquals(toStringEsperadoOrc, orc2.toString());
    }
    
    
    
    
    
    
    
    
    
    
    
    
}
{'fraction_non_alphanumeric': 0.1022973558734287, 'fraction_numerical': 0.017771998266146512, 'mean_word_length': 2.2644978783592644, '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': '3219950', 'n_tokens_mistral': 818, 'n_tokens_neox': 788, 'n_words': 146}