public void GetAllItems() { List <Album> _AlbumList = new List <Album>(); Album _Album1 = new Album(); Album _Album2 = new Album(); Album _Album3 = new Album(); _AlbumList.Add(_Album1); _AlbumList.Add(_Album2); _AlbumList.Add(_Album3); var sRepo = new Mock <IARepo>(); sRepo.Setup(x => x.GetAll()).Returns(_AlbumList); var albumGetAllService = new AlbumGetAllService(sRepo.Object); Assert.AreEqual(albumGetAllService.GetAllItems(), _AlbumList); }
public IEnumerable <Album> Get() { List <Album> _albms = _albumGetAllService.GetAllItems().ToList(); return(_albms); }