Exemplo n.º 1
0
        public void GetAllItemsTest()
        {
            List <Song> _songList = new List <Song>();
            Song        _song1    = new Song();
            Song        _song2    = new Song();
            Song        _song3    = new Song();

            _songList.Add(_song1);
            _songList.Add(_song2);
            _songList.Add(_song3);
            var sRepo = new Mock <ISRepo>();

            sRepo.Setup(x => x.GetAll()).Returns(_songList);
            var songGetAllService = new SongGetAllService(sRepo.Object);

            Assert.AreEqual(songGetAllService.GetAllItems(), _songList);
        }
Exemplo n.º 2
0
        public IEnumerable <Song> Get()
        {
            List <Song> _sngs = _songGetAllService.GetAllItems().ToList();

            return(_sngs);
        }