public void MovieInstanceOK()
 {
     //create an instance of the class
     Movie NewMovie = new Movie();
     //test to see if that exists
     Assert.IsNotNull(NewMovie);
 }
 public void MovieDirectorOk()
 {
     Movie NewMovie = new Movie();
     int testDirectorId = 1;
     NewMovie.DirectorId = testDirectorId;
     Assert.AreEqual(NewMovie.DirectorId, testDirectorId);
 }
 public void MovieID()
 {
     //create an instance of the class
     Movie NewMovie = new Movie();
     //test the id of the movie
     Int32 TestMovieId = 1;
     NewMovie.MovieId = TestMovieId;
     //test to see if that exists
     Assert.AreEqual(NewMovie.MovieId, TestMovieId);
 }
        public void MovieNameExtremeMinimumLength()
        {
            Movie NewMovie = new Movie();
            Boolean valid = false;
            int movieId = 1;
            string movieName = new string('A', Movie.movieNameExtremeMin);
            DateTime releaseDate = DateTime.Now.Date;
            Age Age = Age.Eighteen;
            int directorId = 1;
            string imgUrl = "www.test.com/1.jpg";

            valid = NewMovie.Valid(movieId, movieName, releaseDate, Age, directorId, imgUrl);
        }
        public void MovieNameMaxLength()
        {
            Movie NewMovie = new Movie();
            Boolean valid = true;
            int movieId = 1;
            string movieName = new string('A', Movie.movieNameMaximumLength);
            DateTime releaseDate = DateTime.Now.Date;
            Age Age = Age.Eighteen;
            int directorId = 1;
            string imgUrl = "www.test.com/1.jpg";

            //invoke method
            valid = NewMovie.Valid(movieId, movieName, releaseDate, Age, directorId, imgUrl);
            Assert.IsTrue(valid);
        }
 public void MovieReleaseDateOK()
 {
     Movie NewMovie = new Movie();
     DateTime testReleaseDate = new DateTime(1990, 07, 30);
     NewMovie.ReleaseDate = testReleaseDate;
     Assert.AreEqual(NewMovie.ReleaseDate, testReleaseDate);
 }
 public void MovieNameOk()
 {
     //create an instance of the class
     Movie NewMovie = new Movie();
     //test the name of the movie
     string TestMovieName = "Captain America";
     NewMovie.Name = TestMovieName;
     //test to see if that exists
     Assert.AreEqual(NewMovie.Name, TestMovieName);
 }