Exemple #1
0
 public AlbumsController(AlbumGetAllService albumGetAllService, AlbumGetByIdService albumGetByIdService, AlbumAddService albumAddService, AlbumDeleteService albumDeleteService, AlbumUpdateService albumUpdateService)
 {
     _albumGetAllService  = albumGetAllService;
     _albumGetByIdService = albumGetByIdService;
     _albumAddService     = albumAddService;
     _albumDeleteService  = albumDeleteService;
     _albumUpdateService  = albumUpdateService;
 }
Exemple #2
0
        public void GetItemByIdTest()
        {
            Album _Album = new Album();

            _Album.Title   = "Covers";
            _Album.AlbumId = 0;
            var aRepo = new Mock <IARepo>();

            aRepo.Setup(x => x.GetById(1)).Returns(_Album);
            var albumGetByIdService = new AlbumGetByIdService(aRepo.Object);

            Assert.AreEqual(albumGetByIdService.GetItemById(1), _Album);
        }