Example #1
0
 public SongsController(SongGetAllService songGetAllService, SongGetByIdService songGetByIdService, SongAddService songAddService, SongDeleteService songDeleteService, SongUpdateService songUpdateService)
 {
     _songGetAllService  = songGetAllService;
     _songGetByIdService = songGetByIdService;
     _songAddService     = songAddService;
     _songDeleteService  = songDeleteService;
     _songUpdateService  = songUpdateService;
 }
Example #2
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);
        }