예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (movieValidator.ValidateMovie(txtTitle.Text.Trim(), txtGenre.Text.Trim(), txtActors.Text.Trim()))
     {
         adminMovieHandler.CreateMovie(txtTitle.Text.Trim(), txtGenre.Text.Trim(), txtActors.Text.Trim());
     }
     else
     {
         MessageBox.Show("Invalid data");
     }
 }
예제 #2
0
        public void TestValidateMovie()
        {
            var movieValidator = new MovieValidator();

            Assert.IsFalse(movieValidator.ValidateMovie("123124;';'", "Action", "Portman"));
        }