public void DeleteTest()
        {
            ActualFlight temp = new ActualFlight();

            temp.ActualFlightID = 1;
            Assert.True(temp.Delete());
        }
Ejemplo n.º 2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (ActualFlight.GenerateActualFlight(dateTimePicker.Value.ToString("yyyy-MM-dd")))
     {
         MessageBox.Show("Рейси на " + dateTimePicker.Value.ToString("yyyy-MM-dd") + " додані успішно", "Успіх",
                         MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Рейси на " + dateTimePicker.Value.ToString("yyyy-MM-dd") + " вже були додані", "Помилка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        public void UpdateTest()
        {
            ActualFlight temp = new ActualFlight();

            temp.ActualFlightDate = DateTime.Now;
            temp.Flight           = new Flight("sdsfd");
            temp.Plane            = new Plane("ass", "dsd", "dsd", "sdsd", "sds");
            temp.Terminal         = new Terminal("B");
            temp.StatusFlight     = new StatusFlight("open", "Open");
            temp.TimeDifference   = 0;
            Assert.True(temp.Update());
        }
Ejemplo n.º 4
0
 private void toolStripMenuItemStatus_Click(object sender, EventArgs e)
 {
     ActualFlight.RefreshStatus();
     RefreshFlights(dateTimePicker.Value.ToString("yyyy-MM-dd"));
 }