public void loadTimesTest() { string file = string.Empty; CSVDAO target = new CSVDAO(file); target.FileHandler = new ManicTimeCSVMockFile(); target.loadTimes(); Assert.AreEqual(8, target.count); Assert.AreEqual("With Pat, regarding Schedule", target.getTimes()[7].description); }
private void button1_Click(object sender, EventArgs e) { var FD = new System.Windows.Forms.OpenFileDialog(); if (FD.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string fileToOpen = FD.FileName; CSVDAO list = new CSVDAO(FD.FileName); list.FileHandler = new WindowsFileHandler(); list.loadTimes(); _store.insert(list.getTimes()); System.Windows.Forms.MessageBox.Show("Complete."); } }
public void testEmptyConstructor() { string file = string.Empty; CSVDAO target = new CSVDAO(file); Assert.AreEqual(target.file, string.Empty); }
public void testDefaultTimesContainer() { string file = string.Empty; CSVDAO target = new CSVDAO(file); Assert.AreEqual(target.getTimes().Count, 0); }
public void testDefaultCount() { string file = string.Empty; CSVDAO target = new CSVDAO(file); Assert.AreEqual(0, target.count); }
public void testConstructor() { string file = "C:\\Test.csv"; CSVDAO target = new CSVDAO(file); Assert.AreEqual(target.file, file); }
public void testFile() { string file = string.Empty; // TODO: Initialize to an appropriate value CSVDAO target = new CSVDAO(file); // TODO: Initialize to an appropriate value Assert.AreEqual(target.file, string.Empty); target.file = "SomeFile"; Assert.AreEqual(target.file, "SomeFile"); }
public void testExecute() { string file = string.Empty; CSVDAO target = new CSVDAO(file); Assert.AreEqual(target.execute(), false); }