<commit_before>package com.ltsllc.miranda.deliveries;

import com.google.gson.reflect.TypeToken;
import com.ltsllc.miranda.miranda.Miranda;
import com.ltsllc.miranda.property.MirandaProperties;
import com.ltsllc.miranda.writer.Writer;
import org.junit.Before;
import org.junit.Test;
import com.ltsllc.miranda.test.TestCase;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Clark on 2/22/2017.
 */
public class TestDeliveriesFile extends TestCase {
    private DeliveriesFile deliveriesFile;

    public DeliveriesFile getDeliveriesFile() {
        return deliveriesFile;
    }

    @Before
    public void setup () {
        reset();

        super.setup();

        setupWriter();
        setupMirandaProperties();
        MirandaProperties properties = Miranda.properties;

        String directory = properties.getProperty(MirandaProperties.PROPERTY_DELIVERY_DIRECTORY);
        this.deliveriesFile = new DeliveriesFile(directory, Writer.getInstance());
    }

    @Test
    public void testConstructor () {
        DeliveriesFileReadyState readyState = new DeliveriesFileReadyState(getDeliveriesFile());

        assert (getDeliveriesFile().getCurrentState().equals(readyState));
    }

    @Test
    public void testListType () {
        Type theirType = getDeliveriesFile().listType();
        Type localType = new TypeToken<List<Delivery>>() {}.getType();

        assert (theirType.equals(localType));
    }

    @Test
    public void testBuildEmptyList () {
        List<Delivery> local = new ArrayList<Delivery>();
        List theirs = getDeliveriesFile().buildEmptyList();

        assert (local.equals(theirs));
    }

    @Test
    public void testEquals () {
        assert (getDeliveriesFile().equals(getDeliveriesFile()));
    }
}<commit_msg>Updated TestDelivery<commit_after>package com.ltsllc.miranda.deliveries;

import com.google.gson.reflect.TypeToken;
import com.ltsllc.miranda.file.MirandaFileReadyState;
import com.ltsllc.miranda.miranda.Miranda;
import com.ltsllc.miranda.property.MirandaProperties;
import com.ltsllc.miranda.writer.Writer;
import org.junit.Before;
import org.junit.Test;
import com.ltsllc.miranda.test.TestCase;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Clark on 2/22/2017.
 */
public class TestDeliveriesFile extends TestCase {
    private DeliveriesFile deliveriesFile;

    public DeliveriesFile getDeliveriesFile() {
        return deliveriesFile;
    }

    @Before
    public void setup () {
        reset();

        super.setup();

        setupWriter();
        setupMirandaProperties();
        MirandaProperties properties = Miranda.properties;

        String directory = properties.getProperty(MirandaProperties.PROPERTY_DELIVERY_DIRECTORY);
        this.deliveriesFile = new DeliveriesFile(directory, Writer.getInstance());
    }

    @Test
    public void testConstructor () {
        assert (getDeliveriesFile().getCurrentState() instanceof MirandaFileReadyState);
    }

    @Test
    public void testListType () {
        Type theirType = getDeliveriesFile().listType();
        Type localType = new TypeToken<List<Delivery>>() {}.getType();

        assert (theirType.equals(localType));
    }

    @Test
    public void testBuildEmptyList () {
        List<Delivery> local = new ArrayList<Delivery>();
        List theirs = getDeliveriesFile().buildEmptyList();

        assert (local.equals(theirs));
    }

    @Test
    public void testEquals () {
        assert (getDeliveriesFile().equals(getDeliveriesFile()));
    }
}
{'fraction_non_alphanumeric': 0.10719244654262705, 'fraction_numerical': 0.0038878089419605664, 'mean_word_length': 3.441430332922318, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1694499', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1036, 'n_words': 203}