<commit_before>package dirlididi;

import org.apache.http.HttpStatus;
import org.hamcrest.Matchers;
import org.junit.*;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static com.jayway.restassured.RestAssured.*;

import dirlididi.domain.*;
import dirlididi.repositories.NormalRepository;

import com.google.gson.*;
import com.jayway.restassured.http.ContentType;

@SpringApplicationConfiguration(classes = DirlididApplication.class)
@WebIntegrationTest("server.port=0")
@RunWith(SpringJUnit4ClassRunner.class)
public class UsuarioTest {
	
	@Value("${local.server.port}")
    private int port;
    
    @Autowired
    private NormalRepository normalRepository;
    
    private Normal usuarioNormal;
    
    @Before
    public void setup(){
        usuarioNormal = new Normal("<EMAIL>", "99999999");
        normalRepository.save(usuarioNormal);
    }

    @After
    public void tearDown() {
        normalRepository.deleteAll();
    }
    
    @Test
    public void testCadastrarUsuario() throws Exception {
        Gson gson = new Gson();
        Normal usuarioNormal = new Normal("<EMAIL>", "000000000000");

        given()
                .contentType(ContentType.JSON)
                .body(gson.toJson(usuarioNormal))
                .when()
                .port(this.port)
                .post("/api/user")
                .then().assertThat()
                .body("email", Matchers.is(usuarioNormal.getEmail()));
    }

    @Test
    public void testGetUsuarios() {
        given().when()
                .port(this.port)
                .get("/api/user")
                .then()
                .assertThat()
                .statusCode(HttpStatus.SC_OK);
    }
    <commit_msg>primeiro teste funcionando<commit_after>package dirlididi;

import org.apache.http.HttpStatus;
import org.hamcrest.Matchers;
import org.junit.*;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static com.jayway.restassured.RestAssured.*;

import dirlididi.domain.*;
import dirlididi.repositories.NormalRepository;

import com.google.gson.*;
import com.jayway.restassured.http.ContentType;

@SpringApplicationConfiguration(classes = DirlididApplication.class)
@WebIntegrationTest("server.port=0")
@RunWith(SpringJUnit4ClassRunner.class)
public class UsuarioTest {
	
	@Value("${local.server.port}")
    private int port;
    
    @Autowired
    private NormalRepository normalRepository;
    
    private Normal usuarioNormal;
    
    @Before
    public void setup(){
        usuarioNormal = new Normal("<EMAIL>", "99999999");
        normalRepository.save(usuarioNormal);
    }

    @After
    public void tearDown() {
        normalRepository.deleteAll();
    }
    
    @Test
    public void testCadastrarUsuario() throws Exception {
        Gson gson = new Gson();
        Normal usuarioNormal = new Normal("<EMAIL>", "000000000000");

        given()
                .contentType(ContentType.JSON)
                .when()
                .port(this.port)
                .post("/api/user?email=<EMAIL>&senha=123345454545")
                .then().assertThat()
                .body("email", Matchers.is("<EMAIL>"));
    }

    @Test
    public void testGetUsuarios() {
        given().when()
                .port(this.port)
                .get("/api/user")
                .then()
                .assertThat()
                .statusCode(HttpStatus.SC_OK);
    }
    
{'fraction_non_alphanumeric': 0.11400651465798045, 'fraction_numerical': 0.015033826108744675, 'mean_word_length': 2.791073124406458, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '119136', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1133, 'n_words': 195}