public void AddRateThrowsException() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.AddRate(1, -1)); }
public void AddRateAdds() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); _specificMovieInfoService.AddRate(1, 4); Assert.AreEqual(4, _mockedDummySpecificMovieRepository.currentMovie.AVGRating); }