public void InstanceOK()
        {
            //create an instance of the class we want to create
            clsFilm AnFilm = new clsFilm();

            //test to see that it exists
            Assert.IsNotNull(AnFilm);
        }
        public void FilmDescriptionProperty()
        {
            //create an instance of the class we want to create
            clsFilm AnFilm = new clsFilm();
            //create some test data to assign to the property
            string TestData = "Jaws";

            //assign the data to the proerty
            AnFilm.FilmDescription = TestData;
            //test to see that the two values are the same
            Assert.AreEqual(AnFilm.FilmDescription, TestData);
        }
        public void YearReleasedProperty()
        {
            //create an instance of the class we want to create
            clsFilm AnFilm = new clsFilm();
            //create some test data to assign to the property
            DateTime TestData = DateTime.Now.Date;

            //assign the data to the proerty
            AnFilm.YearReleased = TestData;
            //test to see that the two values are the same
            Assert.AreEqual(AnFilm.YearReleased, TestData);
        }
        public void FilmNameMinusOneMinBoundary()
        {
            //create instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            // boolean variable to store the result of the validation
            Boolean Ok = false;
            //create some test data to assign to the property
            string   FilmName        = "WO";
            string   FilmDescription = "About something interesting";
            DateTime YearReleased    = DateTime.Now.Date;

            //invoke the method
            Ok = AFilm.Valid(FilmName, FilmDescription, YearReleased);
            //test tto see that the reuslt is correct
            Assert.IsFalse(Ok);
        }
        public void ValidMethodOK()
        {
            //create an instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            //boolean variable to store the result of the validation
            Boolean Ok = false;
            //create some data to use with the method
            string   FilmName        = "Jaws";
            string   FilmDescription = "About something interesting";
            DateTime YearReleased    = DateTime.Now.Date;

            //invoke the method
            Ok = AFilm.Valid(FilmName, FilmDescription, YearReleased);
            //test tto see that the reuslt is correct
            Assert.IsTrue(Ok);
        }
        public void YearReleasedMidBoundary()
        {
            //create instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            // boolean variable to store the result of the validation
            Boolean Ok = false;
            //create some test data to assign to the property
            string   FilmName        = "Jaws";
            string   FilmDescription = "John Cena";
            DateTime YearReleased    = DateTime.Now.AddYears(-7);

            //invoke the method
            Ok = AFilm.Valid(FilmName, FilmDescription, YearReleased);
            //test tto see that the reuslt is correct
            Assert.IsTrue(Ok);
        }
        public void FilmDescriptionExtremeMaxBoundary()
        {
            //create instance of the class we want to create
            clsFilm AFilm = new clsFilm();
            // boolean variable to store the result of the validation
            Boolean Ok = false;
            //create some test data to assign to the property
            string FilmName        = "Jaws";
            string FilmDescription = "";

            FilmDescription = FilmDescription.PadRight(100, 'a');
            DateTime YearReleased = DateTime.Now.Date;

            //invoke the method
            Ok = AFilm.Valid(FilmName, FilmDescription, YearReleased);
            //test tto see that the reuslt is correct
            Assert.IsFalse(Ok);
        }