Esempio n. 1
0
        public void FindMethodOK()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            Assert.IsTrue(Found);
        }
Esempio n. 2
0
        public void TestOfficeCodeFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.OfficeCode != 1)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 3
0
        public void TestSoldFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.Sold != true)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 4
0
        public void TestDescriptionFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.Description != "TestDescription")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 5
0
        public void TestColourFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.Colour != "Blue")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 6
0
        public void TestModelFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.Model != "Micra")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 7
0
        public void TestMakeFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.Make != "Nissan")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 8
0
        public void TestNumberPlateFound()
        {
            ClsCar  car   = new ClsCar();
            Boolean Found = false;
            Boolean OK    = true;
            Int32   CarID = 0;

            Found = car.Find(CarID);
            if (car.NumberPlate != "1234ABCD")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Esempio n. 9
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        ClsCar  car = new ClsCar();
        int     CarID;
        Boolean Found = false;

        CarID = Convert.ToInt32(txtCarID.Text);
        Found = car.Find(CarID);
        if (Found == true)
        {
            txtNumberPlate.Text = car.NumberPlate;
            txtMake.Text        = car.Make;
            txtModel.Text       = car.Model;
            txtColour.Text      = car.Colour;
            txtDescription.Text = car.Description;
            txtPrice.Text       = car.Price.ToString();
            txtOfficeCode.Text  = car.OfficeCode.ToString();
        }
    }