Esempio n. 1
0
        public void CreateAlbumReviewTest()
        {
            Assert.AreEqual(2,
                            _albumReviewService.ListAlbumReviews(new AlbumReviewFilter {
                SortAscending = true
            }).Count());

            var albumId = 3;
            var album3  = new AlbumDTO
            {
                ID          = albumId,
                InterpretId = _interpret2Id,
                Name        = "Hybrid Theory",
                Year        = 2000
            };

            _albumService.CreateAlbum(album3, _interpret2Id);

            var albumReview = new AlbumReviewDTO
            {
                AlbumId = albumId,
                Note    = "Not bad",
                Rating  = 9,
                ID      = _albumReview2Id
            };

            _albumReviewService.CreateAlbumReview(albumReview, albumId);

            Assert.AreEqual(3,
                            _albumReviewService.ListAlbumReviews(new AlbumReviewFilter {
                SortAscending = true
            }).Count());
        }
 public IEnumerable <AlbumReviewDTO> ListAlbumReviews(AlbumReviewFilter filter)
 {
     return(_albumReviewService.ListAlbumReviews(filter));
 }