public void Check_Add_Truck() { //arrange Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.truck_number = "KST-11-1392"; information1.driver_name = "Mr. x"; //act bool t = kta_bl.addTruck(information1); //assert Assert.AreEqual(true, t); }
private void button1_Click(object sender, EventArgs e) { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.truck_number = textBox1.Text; information1.driver_name = comboBox1.Text; if (kta_bl.addTruck(information1)) { comboBox1.Text = ""; textBox1.Text = ""; } else { MessageBox.Show("not successful"); } }