public void SaveComentInDBThrowsException() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); Assert.Throws <SpecificMovieException>(() => _specificMovieInfoService.SaveComentInDB(0, "12123")); }
public void SaveComentInDBSavesTheComment() { MockedDummySpecificMovieRepository _mockedDummySpecificMovieRepository = new MockedDummySpecificMovieRepository(); ISpecificMovieInfoService _specificMovieInfoService = new SpecificMovieInfoService(_mockedDummySpecificMovieRepository._specificMovieInfoRepository); _specificMovieInfoService.SaveComentInDB(1, "12123"); Assert.AreEqual(3, _mockedDummySpecificMovieRepository.comments.Count); }