<commit_before>package edu.wheaton.simulator.test.statistics;

import java.util.HashMap;
import java.util.HashSet;

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

import com.google.common.collect.ImmutableSet;

import edu.wheaton.simulator.entity.AgentID;
import edu.wheaton.simulator.entity.Prototype;
import edu.wheaton.simulator.statistics.FieldSnapshot;
import edu.wheaton.simulator.statistics.PrototypeSnapshot;
import edu.wheaton.simulator.statistics.SnapshotFactory;

public class PrototypeSnapshotCase {
	
	String categoryName;
	Prototype prototype;
	HashMap<String, String> fields;
	int population;
	ImmutableSet<AgentID> children;
	Integer step;

	@Before
	public void setUp() throws Exception {
		children = prototype.childIDs();
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		//fail("Not yet implemented");
	}
	
	public void prototypeSnapshotTest() {
		PrototypeSnapshot protoSnap = new PrototypeSnapshot(categoryName, prototype.getPrototypeID(),
				SnapshotFactory.makeFieldSnapshots(fields), population,
				children, step);
		
	}

}
<commit_msg>Finished PrototypeSnapshotCase.java<commit_after>package edu.wheaton.simulator.test.statistics;

/**
 * A JUnit test case for testing PrototypeSnapshot.java.
 * 
 * @author <NAME>
 * Wheaton College, CSCI 335
 * Spring 2013
 * 25 Mar 2013
 */
import java.util.HashMap;

import junit.framework.Assert;

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

import com.google.common.collect.ImmutableSet;

import edu.wheaton.simulator.entity.AgentID;
import edu.wheaton.simulator.entity.Prototype;
import edu.wheaton.simulator.simulation.Grid;
import edu.wheaton.simulator.statistics.PrototypeSnapshot;
import edu.wheaton.simulator.statistics.SnapshotFactory;

public class PrototypeSnapshotCase {
	
	String categoryName;
	Grid grid;
	Prototype prototype;
	HashMap<String, String> fields;
	int population;
	ImmutableSet<AgentID> children;
	Integer step;

	/**
	 * Initialize variables.
	 */
	@Before
	public void setUp() throws Exception {
		categoryName = "testing";
		grid = new Grid(10, 10);
		prototype = new Prototype(grid, "tester");
		fields = new HashMap<String, String>();
		population = 50;
		children = prototype.childIDs();
		step = new Integer(23);
	}

	/**
	 * Give variables null pointers.
	 */
	@After
	public void tearDown() throws Exception {
	}

	/**
	 * Auto-generated method stub.
	 */
	@Test
	public void test() {
		//fail("Not yet implemented");
	}
	
	/**
	 * Tests to make sure a PrototypeSnapshot object was successfully created.
	 */
	public void prototypeSnapshotTest() {
		PrototypeSnapshot protoSnap = new PrototypeSnapshot(categoryName, prototype.getPrototypeID(),
				SnapshotFactory.makeFieldSnapshots(fields), population,
				children, step);
		Assert.assertNotNull("PrototypeSnapshot not created.", protoSnap);
	}
}

{'fraction_non_alphanumeric': 0.10666206420434933, 'fraction_numerical': 0.007248878149810148, 'mean_word_length': 4.796, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7321762', 'n_tokens_mistral': 941, 'n_tokens_neox': 884, 'n_words': 209}