public void FindMethodTest() { clsEquipment AnEquipment = new clsEquipment(); Boolean Found = false; Int32 EquipmentNo = 1; Found = AnEquipment.Find(EquipmentNo); Assert.IsTrue(Found); }
public void TestEquipmentPrice() { clsEquipment AnEquipment = new clsEquipment(); Boolean Found = false; Boolean OK = true; Int32 EquipmentNo = 1; Found = AnEquipment.Find(EquipmentNo); if (AnEquipment.EquipmentPrice != 100) { OK = false; } Assert.IsTrue(Found); }
public void TestEquipmentColour() { clsEquipment AnEquipment = new clsEquipment(); Boolean Found = false; Boolean OK = true; Int32 EquipmentNo = 1; Found = AnEquipment.Find(EquipmentNo); if (AnEquipment.EquipmentColour != "Black") { OK = false; } Assert.IsTrue(Found); }
public void TestEquipmentDescription() { clsEquipment AnEquipment = new clsEquipment(); Boolean Found = false; Boolean OK = true; Int32 EquipmentNo = 1; Found = AnEquipment.Find(EquipmentNo); if (AnEquipment.EquipmentDescription != "Weights") { OK = false; } Assert.IsTrue(OK); }
public void TestEquipmentDateAdded() { clsEquipment AnEquipment = new clsEquipment(); Boolean Found = false; Boolean OK = true; Int32 EquipmentNo = 1; Found = AnEquipment.Find(EquipmentNo); if (AnEquipment.EquipmentDateAdded != Convert.ToDateTime("01/01/2020")) { OK = false; } Assert.IsTrue(OK); }
protected void tbnFind_Click(object sender, EventArgs e) { clsEquipment AnEquipment = new clsEquipment(); Int32 EquipmentNo; Boolean Found = false; EquipmentNo = Convert.ToInt32(txtEquipmentNo.Text); Found = AnEquipment.Find(EquipmentNo); if (Found == true) { txtEquipmentPrice.Text = AnEquipment.EquipmentPrice.ToString(); txtDateAdded.Text = AnEquipment.EquipmentDateAdded.ToString(); txtEquipmentColour.Text = AnEquipment.EquipmentColour; txtDateAdded.Text = AnEquipment.EquipmentDateAdded.ToString(); txtEquipmentDescription.Text = AnEquipment.EquipmentDescription; } }