public void SetUpdatedRateInModelThrowsException() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.SetUpdatedRateInModel()); }
public void SetUpdatedRateInModelPaseses() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); _specificMovieInfoService.GetMovieFromDBAndSetItInModel(1); _specificMovieInfoService.SetUpdatedRateInModel(); Assert.AreEqual(5, _specificMovieInfoService.SetMovieInfo().avgRating); }