示例#1
0
        public void MovieRemoverThrowsException()
        {
            MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository();
            ISpecificMovieInfoService          _specificMovieInfoService           = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository);

            Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.MovieRemover(0));
        }
示例#2
0
        public void MovieRemoverRemoves()
        {
            MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository();
            ISpecificMovieInfoService          _specificMovieInfoService           = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository);

            _specificMovieInfoService.GetMovieFromDBAndSetItInModel(1);
            _specificMovieInfoService.MovieRemover(1);
            Assert.AreEqual(2, _mockedDummySpecificMovieRepository.watchlist.Count);
        }