public void ReturnIqueryableCollectionFromCOMICDataProviderAllMethod() { //Arrange var mockedDataProvider = new Mock <IEfComicShopDataProvider <Comic> >(); //Act var actualComicService = new ComicShop.Data.Services.ComicService(mockedDataProvider.Object); var actualResult = actualComicService.GetAllComics(); //Assert Assert.That(actualResult, Is.Not.Null.And.InstanceOf <IQueryable <Comic> >()); }
public void CallComicDataProviderAllMethod() { //Arrange var mockedDataProvider = new Mock <IEfComicShopDataProvider <Comic> >(); //Act var actualComicService = new ComicShop.Data.Services.ComicService(mockedDataProvider.Object); actualComicService.GetAllComics(); //Assert mockedDataProvider.Verify( service => service.All(), Times.Once); }