<commit_before>package com.syncano.library.tests;

import com.syncano.library.SyncanoApplicationTestCase;
import com.syncano.library.api.Response;
import com.syncano.library.data.AbstractUser;
import com.syncano.library.model.AllTypesProfile;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class ProfilesTest extends SyncanoApplicationTestCase {

    private final static String USERNAME = "username";
    private final static String PASSWORD = "password";

    @Before
    public void setUp() throws Exception {
        super.setUp();
    }

    @After
    public void tearDown() throws Exception {
        super.tearDown();
    }

    @Test
    public void testValuesinProfile() {
        // update profile schema
        assertTrue(syncano.updateSyncanoClass(AllTypesProfile.class).send().isSuccess());

        // create user
        deleteTestUser(USERNAME);
        MyUser user = new MyUser(USERNAME, PASSWORD);
        assertTrue(user.register().isSuccess());

        // get profile id
        AllTypesProfile profile = user.getProfile();
        assertNotNull(profile);

        // generate values for profile
        profile = AllTypesProfile.generateObject(profile.getId(), false);
        profile.reference = profile;

        // send new profile to syncano<commit_msg>Fix in profiles test<commit_after>package com.syncano.library.tests;

import com.syncano.library.SyncanoApplicationTestCase;
import com.syncano.library.api.Response;
import com.syncano.library.data.AbstractUser;
import com.syncano.library.model.AllTypesProfile;
import com.syncano.library.model.Author;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class ProfilesTest extends SyncanoApplicationTestCase {

    private final static String USERNAME = "username";
    private final static String PASSWORD = "password";

    @Before
    public void setUp() throws Exception {
        super.setUp();
    }

    @After
    public void tearDown() throws Exception {
        super.tearDown();
    }

    @Test
    public void testValuesinProfile() throws InterruptedException {
        createClass(Author.class);
        // update profile schema
        assertTrue(syncano.updateSyncanoClass(AllTypesProfile.class).send().isSuccess());

        // create user
        deleteTestUser(USERNAME);
        MyUser user = new MyUser(USERNAME, PASSWORD);
        assertTrue(user.register().isSuccess());

        // get profile id
        AllTypesProfile profile = user.getProfile();
        assertNotNull(profile);

        // generate values for profile
        profile = AllTypesProfile.generateObject(profile.getId(), false);
        profile.reference = profile;

        // send new profile to syncano
{'fraction_non_alphanumeric': 0.09483053748716193, 'fraction_numerical': 0.0, 'mean_word_length': 3.2719298245614037, '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': '5451440', 'n_tokens_mistral': 774, 'n_tokens_neox': 765, 'n_words': 189}