Ejemplo n.º 1
0
        public void FindMethodTest()
        {
            clsEquipment AnEquipment = new clsEquipment();
            Boolean      Found       = false;
            Int32        EquipmentNo = 1;

            Found = AnEquipment.Find(EquipmentNo);
            Assert.IsTrue(Found);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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;
        }
    }