public void T002_NullPhotoIntCollection_ArgumentNullException() { // Arrange var photoRepository = new Mock <IGenericRepository <Photo> > (); photoRepository.Setup(x => x.Find(It.IsAny <int>())).Returns(new Photo()); // Act var findPhotoById = new Services.FindPhotosById.Implementation.FindPhotosByIdService(photoRepository.Object); var result = findPhotoById.Find(null); }
public void T001_EmptyPhotoIntCollection_ReturnsEmptyPhotoCollection() { // Arrange var photoRepository = new Mock <IGenericRepository <Photo> >(); photoRepository.Setup(x => x.Find(It.IsAny <int>())).Returns(new Photo()); // Act var findPhotoById = new Services.FindPhotosById.Implementation.FindPhotosByIdService(photoRepository.Object); var intList = new List <int>(); var result = findPhotoById.Find(intList); // Assert Assert.AreEqual(0, result.Count()); }