public void FindMethodOK()
        {
            clsFilm AFilm  = new clsFilm();
            Boolean Found  = false;
            Int32   FilmID = 1;

            Found = AFilm.Find(FilmID);
            Assert.IsTrue(Found);
        }
Exemple #2
0
        public void FindMethodOk()
        {
            bool    found;
            clsFilm aFilm  = new clsFilm();
            Int32   filmId = 1;

            found = aFilm.Find(filmId);
            Assert.IsTrue(found);
        }
        public void TestFilmIDFound()
        {
            clsFilm AFilm  = new clsFilm();
            Boolean Found  = false;
            Boolean OK     = true;
            Int32   FilmID = 3;

            Found = AFilm.Find(FilmID);
            if (AFilm.FilmID != 3)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
        public void TestFilmDepartureDateFound()
        {
            clsFilm AFilm  = new clsFilm();
            Boolean Found  = false;
            Boolean OK     = true;
            Int32   FilmID = 3;

            Found = AFilm.Find(FilmID);
            if (AFilm.FilmDepartureDate != Convert.ToDateTime("07/09/1996"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #5
0
        public void FindMethodOK()
        {
            //Create an instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            //Boolean variable to store the result of the validation
            Boolean Found = false;
            //Create some test data to use with the method
            Int32 FilmID = 1;

            //Invoke the method
            Found = AFilm.Find(FilmID);
            //Test to see that the result is correct
            Assert.IsTrue(Found);
        }
    //find button
    //add validation to ensure a) if you enter a primary key value for a record that doesn’t exist an error msg appears.
    //b) if you type a text value for the primary key it doesnt let you.
    protected void btnFind_Click(object sender, EventArgs e)
    {
        clsFilm AFilm = new clsFilm();
        Int32   FilmId;
        Boolean Found = false;

        FilmId = Convert.ToInt32(txtFilmId.Text);
        Found  = AFilm.Find(FilmId);

        if (Found == true)
        {
            //display the values of the properties in the form.
            txtFilmName.Text  = AFilm.FilmName;
            txtFilmDesc.Text  = AFilm.FilmDescription;
            txtCert.Text      = AFilm.FilmCertificate;
            txtRelease.Text   = AFilm.FilmReleaseDate.ToString();
            txtDeparture.Text = AFilm.FilmDepartureDate.ToString();
        }
    }
Exemple #7
0
        public void TestGenreIDFound()
        {
            //Create an instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            //Boolean variable to store the result of the search
            Boolean Found = false;
            //Boolean variable to record if data is OK (assume it is)
            Boolean OK = true;
            //Create some test data to use with the method
            Int32 FilmID = 1;

            //Invoke the method
            Found = AFilm.Find(FilmID);
            //Check the Genre ID
            if (AFilm.GenreID != 1)
            {
                OK = false;
            }
            //Test to see that the result is correct
            Assert.IsTrue(OK);
        }