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 testDefaultTimesContainer() { string file = string.Empty; CSVDAO target = new CSVDAO(file); Assert.AreEqual(target.getTimes().Count, 0); }