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

            Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.SetUpdatedRateInModel());
        }
Beispiel #2
0
        public void SetUpdatedRateInModelPaseses()
        {
            MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository();
            ISpecificMovieInfoService          _specificMovieInfoService           = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository);

            _specificMovieInfoService.GetMovieFromDBAndSetItInModel(1);
            _specificMovieInfoService.SetUpdatedRateInModel();
            Assert.AreEqual(5, _specificMovieInfoService.SetMovieInfo().avgRating);
        }