示例#1
0
 private void buttonSaveMovie_Click(object sender, EventArgs e)
 {
     movie_presenter = new NewMoviePresenter(this);
     if (id == 0)
     {
         addNewMovie();
         ClearAllFields();
     }
     else
     {
         updateMovie();
     }
 }
示例#2
0
        public DummyMockedNewMoviePresenter()
        {
            using (var mock = AutoMock.GetStrict())
            {
                mock.Mock <INewMoviePresenter>().Setup(_inewmPresenter => _inewmPresenter.AddMovie(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <Nullable <int> >(),
                                                                                                   It.IsAny <Nullable <DateTime> >(), It.IsAny <string>(), It.IsAny <byte[]>(), It.IsAny <int>()))
                .Callback((string t, int g, Nullable <int> pg, Nullable <DateTime> d, string s, byte[] p, int dur) =>
                {
                    service._inewMovieService.CreateMovie(t, pg, g, d, s, p, dur);
                });

                mock.Mock <INewMoviePresenter>().Setup(_inewmPresenter => _inewmPresenter.LastMovieId())
                .Returns(() => service._inewMovieService.IdOfTheLastMovie());

                _inewMoviePresenter = mock.Create <INewMoviePresenter>();
            }
        }
示例#3
0
 public mov4eAddMovie(INewMoviePresenter _inewmPresenter)
 {
     this.movie_presenter = _inewmPresenter;
 }