package control;

import static org.junit.Assert.*;

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

import com.health.control.*;

public class ControlModuleTest {
	private ControlModule cm;
	
	@Before
	public void setUp() {
		cm = new ControlModule();
	}
	
	@Test
	public void setData() {
		InputData id1 = new InputData("path/to/xml1.xml", "path/to/data1.txt");
		InputData id2 = new InputData("path/to/xml2.xml", "path/to/data2.txt");
		InputData id3 = new InputData("path/to/xml3.xml", "path/to/data3.txt");
		
		InputData[] id = {id1, id2, id3};
		cm.setData(id);
		
		InputData[] expected = {id1, id2, id3};
		
		assertEquals(expected, cm.getScript());
	}
	
	@Test
	public void setScript() {
		cm.setScript("hist('histogram.png', avgByDay.AvgCreatinine, avgByDay.DateTime.DayOfYear, 365);");
		String expected = "hist('histogram.png', avgByDay.AvgCreatinine, avgByDay.DateTime.DayOfYear, 365);";
		
		assertEquals(expected, cm.getScript());
	}
	
	@Test
	public void getData() {
		
	}

}

@@ -611,32 +611,37 @@
 d3%7D;%0A%09%09%0A%09%09assert
+Array
 Equals(expected,

Update tests ControlModule and InputData