<commit_before>package ru.ematveev;

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

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
 * @author <NAME>.
 */
public class SortBigFileTest {
    private File fR;
    private File fW;

    /**
     * Method will be before start testSort().
     * @throws Exception Exception.
     */
    @Before
    public void setUp() throws Exception {
        String sr = File.separator;
        fW = File.createTempFile("textW", ".txt");
        fR = new File(sr + "Users" + sr + "apple" + sr + "Documents" + sr + "JAVA" + sr + "J" + sr + "textR.txt");
    }

    /**
     * Тест проверяет правильность сортировки файла.
     *
     * @throws Exception Exception.
     */
    @Test
    public void testSort() throws Exception {
        SortBigFile sortBigFiler = new SortBigFile();
        sortBigFiler.sort(fR, fW);

        String line = "";

        try {
            Scanner fileScanner = new Scanner(new FileReader(fW));
            while (fileScanner.hasNext()) {
                line = line + fileScanner.nextLine();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        assertThat(line, is("Оля" + "Евгений" + "Александр"));
    }
}





<commit_msg>checkstyle<commit_after>package ru.ematveev;

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

import java.io.File;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.util.Scanner;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
 * @author <NAME>.
 */
public class SortBigFileTest {
    private File fR;
    private File fW;

    /**
     * Method will be before start testSort().
     * @throws Exception Exception.
     */
    @Before
    public void setUp() throws Exception {
        String sr = File.separator;
        fW = File.createTempFile("textW", ".txt");
        //fR = new File(sr + "Users" + sr + "apple" + sr + "Documents" + sr + "JAVA" + sr + "J" + sr + "textR.txt");
        fR = File.createTempFile("textR", ".txt");
        try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(fR))) {
            bufferedWriter.write("Евгений" + "\n"
                    + "Александр" + "\n"
                    +  "Оля" + "\n");
        }
    }

    /**
     * Тест проверяет правильность сортировки файла.
     *
     * @throws Exception Exception.
     */
    @Test
    public void testSort() throws Exception {
        SortBigFile sortBigFiler = new SortBigFile();
        sortBigFiler.sort(fR, fW);

        String line = "";

        try {
            Scanner fileScanner = new Scanner(new FileReader(fW));
            while (fileScanner.hasNext()) {
                line = line + fileScanner.nextLine();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        assertThat(line, is("Оля" + "Евгений" + "Александр"));
    }
}






{'fraction_non_alphanumeric': 0.12962962962962962, 'fraction_numerical': 0.0, 'mean_word_length': 2.229896907216495, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1215154', 'n_tokens_mistral': 1017, 'n_tokens_neox': 992, 'n_words': 233}