Exemple #1
0
        public void GetItemByIdTest()
        {
            Song _song = new Song();

            _song.SongTitle = "In The End";
            _song.AlbumId   = 0;
            var sRepo = new Mock <ISRepo>();

            sRepo.Setup(x => x.GetById(1)).Returns(_song);
            var songGetByIdService = new SongGetByIdService(sRepo.Object);

            Assert.AreEqual(songGetByIdService.GetItemById(1), _song);
        }
        public Song Get(int id)
        {
            Song _sngs = _songGetByIdService.GetItemById(id);

            return(_sngs);
        }