<commit_before>package mixit.integration

import mixit.model.Role
import mixit.model.User
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.springframework.http.MediaType.APPLICATION_JSON
import org.springframework.web.reactive.function.client.bodyToFlux
import org.springframework.web.reactive.function.client.bodyToMono
import reactor.core.publisher.test



class UserIntegrationTests : AbstractIntegrationTests() {

    @Test
    fun `Create a new user`() {
        client.post().uri("/api/user/").accept(APPLICATION_JSON).contentType(APPLICATION_JSON)
                .body(User("brian", "Brian", "Clozel", "<EMAIL>"))
                .retrieve()
                .bodyToMono<User>()<commit_msg>Update for latest WebFlux API changes<commit_after>package mixit.integration

import mixit.model.Role
import mixit.model.User
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.springframework.http.MediaType.APPLICATION_JSON
import org.springframework.web.reactive.function.client.bodyToFlux
import org.springframework.web.reactive.function.client.bodyToMono
import reactor.core.publisher.test



class UserIntegrationTests : AbstractIntegrationTests() {

    @Test
    fun `Create a new user`() {
        client.post().uri("/api/user/").accept(APPLICATION_JSON).contentType(APPLICATION_JSON)
                .syncBody(User("brian", "Brian", "Clozel", "<EMAIL>"))
                .retrieve()
                .bodyToMono<User>()
{'fraction_non_alphanumeric': 0.11473272490221642, 'fraction_numerical': 0.0, 'mean_word_length': 4.0493421052631575, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6538264', 'n_tokens_mistral': 461, 'n_tokens_neox': 434, 'n_words': 76}