<commit_before>package com.bitzl.open.data.distance.heatmap.model;

import com.bitzl.open.data.distance.heatmap.model.api.Detail;
import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;


public class CsvRowTest {

    private CsvRow row;
    @Before
    public void setUp() throws Exception {
        row = new CsvRow();
    }

    @Test
    public void emptyColumnShouldCreateNewColumn() {
        row.emptyColumn();
        row.add("X");
        assertThat(row.toString(), is(CsvRow.SEPARATOR + "X"));
    }

    @Test
    public void addDetailShouldAddTextAndValue() {
        Detail detail = new Detail();
        detail.setValue(12L);
        detail.setText("ABC");
        row.add(detail);
        assertThat(row.toString(), is("12.0" + CsvRow.SEPARATOR + "ABC"));
    }

}<commit_msg>Added tests.<commit_after>package com.bitzl.open.data.distance.heatmap.model;

import com.bitzl.open.data.distance.heatmap.model.api.Detail;
import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;


public class CsvRowTest {

    private CsvRow row;
    @Before
    public void setUp() throws Exception {
        row = new CsvRow();
    }

    @Test
    public void emptyColumnShouldCreateNewColumn() {
        row.emptyColumn();
        row.add("X");
        assertThat(row.toString(), is(CsvRow.SEPARATOR + "X"));
    }

    @Test
    public void addDetailShouldAddTextAndValue() {
        Detail detail = new Detail();
        detail.setValue(12L);
        detail.setText("ABC");
        row.add(detail);
        assertThat(row.toString(), is("12.0" + CsvRow.SEPARATOR + "ABC"));
    }


    @Test
    public void addShouldCreateTwoEmptyColumnsIfDetailIsNull() {
        Detail detail = null;
        row.add(detail);
        assertThat(row.toString(), is(CsvRow.SEPARATOR));
    }
}
{'fraction_non_alphanumeric': 0.12796697626418987, 'fraction_numerical': 0.005159958720330237, 'mean_word_length': 2.925101214574899, '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': '18452', 'n_tokens_mistral': 631, 'n_tokens_neox': 612, 'n_words': 117}