Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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.");
     }
 }