Exemple #1
0
        public void AddRateThrowsException()
        {
            MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository();
            ISpecificMovieInfoService          _specificMovieInfoService           = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository);

            Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.AddRate(1, -1));
        }
Exemple #2
0
        public void AddRateAdds()
        {
            MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository();
            ISpecificMovieInfoService          _specificMovieInfoService           = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository);

            _specificMovieInfoService.AddRate(1, 4);
            Assert.AreEqual(4, _mockedDummySpecificMovieRepository.currentMovie.AVGRating);
        }